Skip to content

Unlimited polymorphic hashmap key type #1019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chuckyvt
Copy link
Contributor

I ran across this thread on Intel Fortran forums, which based on their interpretation of the standard, the transfer intrinsic should accept an unlimited polymorphic argument. Was excited to see this, as this could potentially simplify the hashmap code, and allow the routine to accept any type as key value. This PR incorporates that work.

However, based on the CI runs, while Intel compilers support it, GFortran does not and has a compilation failure. Based on the need for the stdlib to work with GFortran, I assume this PR is dead in the water for the time being, but I thought it still worth submitting for reference.

Based on this bugreport it appears there has been some effort on intrinsic support of unlimited polymorhpic variables, if anyone would like to file a follow up bug report based on this.

@jalvesz
Copy link
Contributor

jalvesz commented Jul 21, 2025

@chuckyvt I think it is better if you keep this PR in draft state until a solution is found that enables compiling with gfortran as well.

Indeed, stdlib should not be locked by a single compiler, this of course implies that only features that are supported by at least a few versions of intel and gnu compilers will be allowed. It might hold back on certain aspects but also guarantees a certain level of robustness. You could explore options with C preprocessor macros.

Roll back rank_1 unlimited polymorphic changes to work around a Gfortran bug that was causing those features to crash.  Currently Gfortran seems to only support unlimited polymorphic scalar values for the transfer intrinsic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants