https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64678

Ian Harvey <ian_harvey at bigpond dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian_harvey at bigpond dot com

--- Comment #6 from Ian Harvey <ian_harvey at bigpond dot com> ---
This comes up from time to time in various places...

F2003/F2008 and F2018 all include words in the section on the scope of
statement and construct entities (F2018 19.4) that the "associate names of an
ASSOCIATE construct have the scope of the block", where "the block" is the
chunk of source that is in between the ASSOCIATE and END ASSOCIATE statements,
excluding those delimiting statements (see F2018 R1102).

The original code is non-conforming - the associate name A is not in scope
within the associate statement (versus "the block"), so `A` in the second
association is an implicitly declared variable of type REAL, and a REAL
variable does not have a component or type parameter named `map`.

Current trunk rejects the code with an appropriate error message.

Reply via email to