This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: suggestion about g77


Steve Kargl wrote:

No. The F77 does not explicitly allow the behaviour discussed in PR 19425. You've found a bug in g77. From the F77 standard

    The form of a SAVE statement is:
                 SAVE [a [, a]...]
    where each a is a named common block name preceded and followed by a slash,
    a variable name, or an array name.  Redundant appearances of an item are
    not permitted.

    Dummy argument names, procedure names, and names of entities in a common block
    must not appear in a SAVE statement.

    A SAVE statement without a list is treated as though it contained the names
    of all allowable items in the program unit.

Note the part of redundant appaerances.

That's debatable - I know about this issue because NAG f95 was giving inconsistent
results; a conversation with their technical support, resulted in the conclusion that "redundant appearances of an item" did not include global save statements which do not explicitly mention an item; so that the code mentioned *is* legal F77.


Certainly I think the idiom is not uncommon in F77 codes, and needs supported in any case.

Toby

--
Dr. Toby White Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK
Email: <tow21@cam.ac.uk>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]