Subject: hpff-interpret: Storage association and NEW

From: <[email-masked]> (Henry Zongaro)
Date: Thu, 7 Nov 1996 16:02:23 -0500 (EST)

---------------------------------------------------------------------------
[email-masked] is a mailing list for corrections,
clarifications, and interpretations related to High Performance Fortran.
Instructions for adding or deleting yourself from this list appear at the
bottom of this message.
---------------------------------------------------------------------------

Hello,

     An interpretation to HPF 1.0 (question 6.12) noted that a NEW variable
must not be:

       an object in COMMON or storage associated with an object in COMMON;
       use associated;
       host associated; nor
       accessed via host association.

     This was missed in putting out the HPF 1.1 document, but was added to the
HPF 2.0 document.  However, I believe that there's one case that was missed -
the variable must not be specified in an equivalence statement.

     For example,

            integer eq1, eq2, a(10)
            equivalence (eq1, eq2)

      !hpf$ independent, new(eq1)
            do idx = 1, 10
              eq1 = idx
              a(idx) = eq2
            end do
            end

The rules were framed so that an implementation would be free to create new
instances of NEW variables for every iteration of the loop, but what impact
does that have on eq2 in the above example?

     It might be argued that both eq1 and eq2 in the example should be
considered to be NEW, but then that brings up the following example:

            integer eq1, eq2(2), a(10)
            equivalence (eq1, eq2)

            eq2(2) = 99

      !hpf$ independent, new(eq1)
            do idx = 1, 2
              eq1 = idx
              a(idx) = eq2(1) + eq2(2)
            end do
            end

Is only eq2(1) NEW, or is all of eq2 NEW?

     For simplicity of implementation, I would suggest that we just say that
a variable which appears in NEW must not be specified in an EQUIVALENCE
statement.

Thanks,

Henry
---------------------------------------------------------------------------
To (un)subscribe to this list, send mail to
[email-masked].
Leave the subject line blank, and in the body put the line
(un)subscribe <email-address>
---------------------------------------------------------------------------