I’m dealing with some legacy code that uses COMMON blocks extensively and sometimes uses the SAVE statement. After consulting the Fortran standard, it says:
The appearance of a common block name preceded and followed by a slash in a
SAVEstatement has the effect of specifying all of the entities in that common block.
Under what circumstances does placing a variable in a common block not imply SAVE? Since the variable must be accessible in any other program unit that includes that common block, how could it not be SAVEed?
I had to look it up, because I was under the same impression as you are.
It seems that only variables in an unnamed, so-called blank, common block retain their definition status across the entire program. Unsaved variables in a named common block become undefined on return from a subprogram, unless another currently active program unit includes a common statement for the same common block.
From the standard (Fortran 77, but the latest one contains similar wording):