Skip to content
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

remove implicit save attribute to binary variables #800

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

pmocz
Copy link
Member

@pmocz pmocz commented Mar 18, 2025

implicit save attribute can be a source of bugs, especially for restart

@pmocz pmocz requested review from rhdtownsend and orlox as code owners March 18, 2025 21:02
@pmocz pmocz self-assigned this Mar 18, 2025
@pmocz pmocz requested review from mathren and Debraheem March 18, 2025 21:03
@matthiasfabry
Copy link
Contributor

Strange, none of these parameter had the keyword save tagged to them. Is this the default behavior of FORTRAN compilers? To assume any variable that is assigned at declaration is save?

@warrickball
Copy link
Contributor

AFAIK this is part of the Fortran standard, e.g. in Sec. 11.2 in this document,

(R1104) If an object of a type for which component-initialization is specified (R444) appears in the specification-part of a module and does not have the ALLOCATABLE or POINTER attribute, the object shall have the SAVE attribute.

@matthiasfabry
Copy link
Contributor

Huh! The more you know... This will likely save me (ha get it) tons of debugging time!

@pmocz pmocz merged commit 6abd85a into main Mar 19, 2025
4 checks passed
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.

3 participants