No. It should produce an error message. You can't find a prohibition
because it is built into the syntax instead of prohibitted in words. The
bnf for the SAVE statement says that it has a saved-entity-list, where a
saved entity (R544) is object-name, proc-pointer-name, or
/common-block-name/.
I didn't bother to actually track down proc-pointer-name because it
seems pretty obvious that better not fit (if it does, then that would
hav eto be an error in the standard, but I rather doubt it fits). It is
almost as obvious to be that object-name had better be the name of an
object, but I suppose that one just possibly might have slipped through
somewhere... Nope. Looks fine. See the bnf for object-name (R505), which
comes with the obvious constraint (C505) The object-name shall be the
name of a data object.
So not only "should" it produce an error message, it is a constraint
violation, which puts in in the set of things that the compiler is
required to be able to diagnose ("required to" being stronger than
"should").
I suppose another interpretation is that the SAVE statement effectively
declares a local variable named i, which is what it would do without the
namelist statement. But that runs into another prohibition, which I
won't bother to track down citations for - the prohibition against
having two different class 1 entities with the same name in the same
scope.
I'm guessing that you overlooked that "object" has a precise meaning in
Fortran. I'll let you go track the references for that, but I assure you
that a namelist-group isn't one. "Object" isn't like "entity" which is
just standard speak for "thing". I personally objected to the standard's
definition on "entity" in the glossary, because it tries to sound like
it actually means something. Instead, that list in the glossary is
nothing but a spew of every kind of thing that people could think of
that might be relevant to any usage of "entity" in the standard. There
is no coherence of meaning other than that; "entity" in the standard
really just does mean "thing - anything". But "object" is short for
"data object" and is much more precise. (It also has no particular
connection to "object-oriented").
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain