-
Notifications
You must be signed in to change notification settings - Fork 137
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
FMS does not appear to compile with GFortran 14.1 #1527
Comments
We have a check for a similar compiler bug in our configure script. It would test assigning a string with subscripts in the select type. It was added for gcc 4.8 originally but looks like it's made a return in 14. We should be able to get rid of the explicit string bounds as long as that doesn't mess with the strings, it's definitely been fixed in the newer nvhpc versions. |
@marshallward My apologies, I was wrong about the substring issue being fixed in the new nvidia compiler (must've been thinking of a different bug...). It still needs a substring specified to work properly within the select type, otherwise it winds up with an incorrect length when it gets passed into a routine. Since this was a regression from previous gcc versions we will need to wait for a fix to support GCC 14. I will put in a bug report for gcc and make sure there's one in for nvidia. |
This has reportedly been fixed in the gcc dev branch: |
Describe the bug
The GFortran 14.1 parser is choking on a particular line in FMS2_IO:
The line is
The error (and corresponding build command) is:
It does not like these
attribute_value(1:str_len))
terms. If I get rid of the(1:str_len)
then it works fine. (There is another similar error that can be fixed in the same way.)To Reproduce
Compile the FMS library with GFortran 14.1. Then make the modifications above to verify that it works.
Expected behavior
Should compile
System Environment
None of this is relevant. This is happening in both MacOS and several Linux environments.
Additional context
I recall that these changes were made to accommodate character
select type
blocks in PGI (now Nvidia) Fortran. We may find that this has been fixed in the newer Nvidia compilers, and no longer require such a trick.The text was updated successfully, but these errors were encountered: