-
Notifications
You must be signed in to change notification settings - Fork 47
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
Avoid false positive warnings turned into an error #791
Conversation
Since you are here, could you also add my other comment #783 (comment) ? |
Thank you, Alfio! Will do. The comment did not arrive on my end yet because of the GitHub user name (hpf). Ahh, High Performance Fortran for sure ;-) |
Oh dear... sorry for that... I will try to fix the macos error too (seems now we have gcc v13). |
876c7f1
to
7b5a4d5
Compare
GCC/latest test is now passing. |
4f331b0
to
f2c634b
Compare
cmake/CompilerConfiguration.cmake
Outdated
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") # requires for 10+ for the MPI wrap module | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") # required for 10+ (MPI wrap) | ||
endif () | ||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # comparison against CXX version rather than GFortran version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we have to extend the condition to cover both cases, i.e.:
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # false positive (allocatable array)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Werror=uninitialized")
else ()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wno-error=uninitialized")
endif ()
Then, the warning seems real, due to #694 (likely the new GCC is more pedantic).
In the meantime, I've merged #792 to fix ROCm and macOS CI tests |
For instance, https://github.com/cp2k/dbcsr/actions/runs/9078189846/job/24944690222