From johnreid@maths.anu.edu.au Fri Apr  7 07:06:35 1995
Received: from cain.anu.edu.au by dkuug.dk with SMTP id AA27156
  (5.65c8/IDA-1.4.4j for <sc22wg5@dkuug.dk>); Thu, 6 Apr 1995 13:07:30 +0200
Received: by cain.anu.edu.au id AA17646
  (5.65c/IDA-1.4.4 for sc22wg5@dkuug.dk); Thu, 6 Apr 1995 21:06:35 +1000
Date: Thu, 6 Apr 1995 21:06:35 +1000
From: "John.Reid" <John.Reid@maths.anu.edu.au>
Message-Id: <199504061106.AA17646@cain.anu.edu.au>
To: mellis@vax.ox.ac.uk, sc22wg5@dkuug.dk
Subject: Target arguments
Cc: lrr@ironwood.cray.com
X-Charset: ASCII
X-Char-Esc: 29

Miles,

      Another paper for the table, please. This was meant to be joint with
Larry Rolison, but he has got buried by work at Cray and I am about to
go on pure holiday out of reach of a terminal. If you get a replacement 
paper from Larry, that's fine with me.

Larry is very concerned with the present interpretation 25. He wants:

  * A dummy array to be in contiguous storage if it is
     of explicit shape or assumed size. Only if it is of assumed shape
     might it be discontiguous.

  * Whether or not temporary storage is utilized when an actual array
    is passed to a dummy array to be solely dependent on whether it
    is in contiguous storage and whether the dummy array needs to be in
    contiguous storage.

It seems to me to be very desirable to allow this implementation,
and there was a lot of support on the net.

It gives the following edits (to 1539 plus the two corrigenda):

  
1. Section 12.4.1.1, delete the corrigendum 2 text at the end of the
fourth paragraph [173:6]:
      "If the dummy argument has the TARGET attribute and the actual
       argument has the TARGET attribute but is not an array section
       with a vector subscript, the dummy and actual arguments must
       have the same shape."
and add the following new paragraphs:

A <<sequence array>> is:

  (1) An explicit-shape array,

  (2) An assumed-size array,

  (3) An allocated allocatable array,

  (4) A pointer whose target was created by an allocate statement or
      is a sequence array, or

  (5) A section of a sequence array where the last <section-subscript>
      is a <subscript-triplet> with a <stride> value of 1 or a
      <subscript> and where each other <section-subscript> is a
      <section-triplet> with a <stride> value of 1 that selects the
      whole of the corresponding dimension of the array.

A dummy argument with the TARGET attribute is <<target compatible>> with 
the corresponding actual argument if

   (1) The dummy argument is scalar,

   (2) The actual argument is a sequence array or an element of a 
       sequence array, or

   (3) The dummy argument is an assumed-shape array and the actual
       argument is not an array section with a vector subscript.

 
2. Section 12.4.1.1, fifth paragraph, last sentence [173:10-13]
   after 'if it is associated' add, "with a dummy argument of the
   procedure that has the TARGET attribute but is not target compatible
   with the corresponding actual argument or is associated".
 
3. Section 12.4.1.1,  in the corrigendum 2 text that replaces the sixth
paragraph [173:14-17]:
change  "If the dummy argument has the TARGET attribute and the
        corresponding actual argument has the TARGET attribute but
        is not an array section with a vector subscript:"
to
       "If the dummy argument has the TARGET attribute and is target
	compatible with corresponding actual argument:"
and change
        "If the dummy argument has the TARGET attribute and the
        corresponding actual argument does not have the TARGET
        attribute or is an array section with a vector subscript,"
to 
	"If the dummy argument has the TARGET attribute and the
	corresponding actual argument does not have the TARGET
	attribute or the dummy and actual arguments are not target
	compatible,"
 
4. Section C.12.8, in the corrigendum 2 text that replaces  the second
paragraph through the end of the section [292:5-37]:
change
      "When execution of a procedure completes, any pointer that remains
      defined and that is associated with a dummy argument that has the
      TARGET attribute, remains associated with the corresponding actual
      argument if the actual argument has the TARGET attribute and is
      not an array section with a vector subscript."
to
     "When execution of a procedure completes, any pointer that remains
      defined and that is associated with a dummy argument that has the
      TARGET attribute, remains associated with the corresponding actual
      argument if the dummy and actual arguments are target compatible."
 
 

I wish there were not so many edits, but once the new definitions are out of
the way, it is a simplification.

Best wishes,
JOhn. 


 
