forked from NOAA-EMC/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PGI warnings about intent for restart_CS
- The PGI compiler was complaining about some `intent(in) :: CS` in MOM_restart.F90. This was because of a line that changes the state of data pointed to from within `CS`, but not `CS` itself: CS%restart_field(n)%initialized = .true. The strict interpretation is that `CS` is not modified because `CS%restart_field` is a pointer to memory elsewhere. However, the `intent(in)` indicates to the user/programmer that nothing changes and since all arguments to the functions are `intent(in)` most entities, including the PGI compiler, should be surprised that something changed as a result of a passive "query" function. This strict interpretation allows a devious hidden-change-of-state to occur. - Changing the intent to `intent(inout)` has the consequence that the new intent has to be propagated upwards through the code. And why should a type be `intent(out)` for query functions? - This commit removes offending lines that change the state. Apparently we didn't need them!?
- Loading branch information
1 parent
d2d3236
commit 1e9febe
Showing
1 changed file
with
0 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters