From jwagener@amoco.com Sat Feb 20 07:20:23 1993
Received: from interlock.amoco.com by dkuug.dk with SMTP id AA19739
  (5.65c8/IDA-1.4.4j for <SC22WG5@dkuug.dk>); Sat, 20 Feb 1993 20:20:23 +0100
Received: by interlock.amoco.com id AA07780
  (InterLock SMTP Gateway 1.1 for SC22WG5@dkuug.dk);
  Sat, 20 Feb 1993 13:13:04 -0600
Received: by interlock.amoco.com (Internal Mail Agent-2);
  Sat, 20 Feb 1993 13:13:04 -0600
Received: by interlock.amoco.com (Internal Mail Agent-1);
  Sat, 20 Feb 1993 13:13:04 -0600
Date: Sat, 20 Feb 93 13:20:23 CST
Message-Id: <9302201920.AB16824@trc.amoco.com>
From: Jerrold L. Wagener <jwagener@amoco.com>
To: SC22WG5@dkuug.dk
Subject: X3J3/93-006r, subset for Mar 1-30 X3J3 ballot
X-Charset: ASCII
X-Char-Esc: 29

argument that is associated with a dummy argument of the procedure that has 
the TARGET attribute."

2.        Section 12.4.1.1, add at the end of the fourth paragraph,  " If the 
dummy argument has the TARGET attribute, the actual argument must have the 
TARGET attribute and the type, type parameters, and ranks must agree."

3.        Section 12.4.1.1, fifth paragraph, last sentence [173: 10-14] 
delete, "with a dummy argument of the procedure that has the TARGET attribute 
or"

4.        Section 12.4.1.1, delete the sixth paragraph [173: 14-17] and 
replace with, "When execution of a procedure completes, a pointer which is 
associated with a dummy argument of the procedure that has the TARGET 
attribute remains associated with the actual argument."

5.         Section C.12.8, delete the second paragraph through the end of the 
section [292: 5-37] and replace with 

A pointer that is associated with a dummy argument that has the TARGET 
attribute when execution of a procedure completes remains associated with the 
corresponding actual argument.

REAL, POINTER      :: PBEST
REAL, TARGET       :: B (10000)
CALL BEST (PBEST, B)
...
CONTAINS
   SUBROUTINE BEST (P, A)
   REAL, POINTER     :: P
   REAL, TARGET      :: A (:)
   ...                                       !Find the "best" element A(I)
   P => A (I)
   RETURN
   END SUBROUTINE
END

It is illegal to associate a dummy argument that has the TARGET attribute 
with an actual argument that does not have the TARGET attribute.  An explicit 
interface is required when calling a procedure which has a dummy argument 
that is a target.  In the following example, an expression is argument 
associated with a target dummy argument. The presence of the explicit 
interface allows a processor to detect this error.

POINTER P
CALL FRED (P, 4.5+X)               ! Invalid call to FRED
PRINT *, P
...
CONTAINS
   SUBROUTINE FRED (PTR, TGT)
   POINTER PTR
   TARGET TGT
   PTR => TGT
   RETURN
   END SUBROUTINE
END

SUBMITTED BY:  Jon Steidel - X3J3/93-125
LAST SIGNIFICANT CHANGE:  1993-02-12        000125
HISTORY:  Submitted as X3J3/93-125 with draft response at meeting 124 and 
adopted 
                                                      by a vote of (15-1)

--------------------------------------------------------------------------

NUMBER: 000129
TITLE: Array constructors in initialization expressions
KEYWORDS: array constructors, initialization expressions, implied-DO variables
DEFECT TYPE: Interpretation
STATUS: X3J3 draft response

QUESTION:  It was likely the intent of the standard to allow the program 
fragment

            INTEGER ARRAY(3)
            PARAMETER ( ARRAY = (/ (ABS(I), I=-3,-1) /) )

However, according to the text in the second list in 7.1.6.1 U(/ (ABS(I), I=-
3,-1) /)U is not an initialization expression.

The array constructor U(/ ABS(-3), ABS(-2), ABS(-1) /)U qualifies as an 
initialization expression since item (2) in the list indicates that an array 
constructor is an initialization expression if each element is an 
initialization expression, and (4) includes

      "An elemental intrinsic function reference of type integer or character 
where
        each argument is an initialization expresssion of type integer or 
character."

The problem with the UABS(I)U in PARAMETER ( ARRAY = (/ (ABS(I), I=-3,-1) /) 
) is that UABS(I)U is not defined as an initialization expression.  It does 
not qualify under (4) as UIU is not an initialization expression and it does 
not qualify under (2) as the primary UABS(I)U is neither an initialization 
expression nor an implied-do variable.

Is the program fragment standard conforming.

ANSWER:  No, the fragment is not standard conforming.

        In the fragment

            PARAMETER (ARRAY = (/ (ABS(I), I = -3, -1) /) )

        and considering 7.1.6.1, second list, rule 2

            ABS(I) is an element of the array constructor.  It is
            an expression consisting of exactly one primary, a function
            reference.

            That function reference has one argument, I, which is
            another expression consisting of exactly one primary.
            That primary is not an initialization expression and thus
            does not meet the requirements of rule 4.

Nothing could be found indicating that the intent of standard was other than 
that indicated above.

REFERENCES:  ISI/IEC 1539:1991 (E) section 7.1.6.1

EDITS:  None.

SUBMITTED BY:  Janice C. Shepherd
HISTORY:  meeting 124: submitted as paper 93-027
                                    draft response 93-088 approved

--------------------------------------------------------------------------

NUMBER: 000130
TITLE: Multiple statements on line with END statement
KEYWORDS: END statement
DEFECT TYPE: Erratum
STATUS: X3J3 draft response

QUESTION:  Can the end statement of a program unit be followed on the same 
line with statements for another program unit?

By use of a ';' one can have multiple statements appear on a single line as 
in:

       A = 1;  B = A;

The standard does not seem to indicate one way or another whether an END 
statement can be followed by another statement on the same line. Presumably 
the statement would belong to the next compilation unit if such use was 
allowed, e.g.:

      END; SUBROUTINE S

It is hoped that the intent of the standard is that any statement appearing 
on the same line as a program unit END statement must appear before the END 
statement.

Note that
      END; SUBROUTINE S
looks very much like
      END SUBROUTINE S;
with a slight typo.

ANSWER:   No, a program unit END statement cannot be followed on the same 
line with statements for another program unit.

The text in 3.3 "Source Form" is incomplete and an edit is provided for its 
repair.

REFERENCES:  ISO/IEC 1539:1991 (E) sections 3.3.1.2 and 3.3.2.2

EDIT:   Replace the first sentence of 3.3 with:

    A Fortran program unit is a sequence of one or more lines,
    organized as Fortran statements, comments, and INCLUDE lines.

SUBMITTED BY:  Janice C. Shepherd
HISTORY: meeting 124: submitted as paper 93-059
                                   approved response 93-094

==============================================================

LAST SIGNIFICANT CHANGE:  before meeting 123                000011         3
LAST SIGNIFICANT CHANGE:  1993-02-12                        000027         4
LAST SIGNIFICANT CHANGE:  1993-02-11                        000030         5
LAST SIGNIFICANT CHANGE:  1993-02-12                        000039         5
LAST SIGNIFICANT CHANGE:  1993-02-12                        000041         6
LAST SIGNIFICANT CHANGE:  1992-11-11, new                   000070         8
LAST SIGNIFICANT CHANGE:  1992-11-12, added edits to previously
                                      proposed interpretation   000071     8
LAST SIGNIFICANT CHANGE:  93-02-11                          000073         9
LAST SIGNIFICANT CHANGE:  92-11-11, first draft response    000075         9
LAST SIGNIFICANT CHANGE:  1993-02-10                        000079        10
LAST SIGNIFICANT CHANGE:  93 02 11, initial response        000082        10
LAST SIGNIFICANT CHANGE:  1992-11-10, new                   000086        12
LAST SIGNIFICANT CHANGE:  1993-02-10                        000087        12
LAST SIGNIFICANT CHANGE:  1993-02-10                        000089        12
LAST SIGNIFICANT CHANGE:  1993-02-10                        000091        13
LAST SIGNIFICANT CHANGE:  1993-02-10                        000092        14
LAST SIGNIFICANT CHANGE:  1993-02-10                        000093        14
LAST SIGNIFICANT CHANGE:  92-11-11                          000097        15
LAST SIGNIFICANT CHANGE:  1993-02-10                        000100        15
LAST SIGNIFICANT CHANGE:  93 Feb.                           000105        16
LAST SIGNIFICANT CHANGE:  1993-02-10, expanded discussion   000106        17
LAST SIGNIFICANT CHANGE:  1993-02-10                        000108        18
LAST SIGNIFICANT CHANGE:  Nov. 1992, original draft response000112        18
LAST SIGNIFICANT CHANGE:  1993-02-11                        000113        19
LAST SIGNIFICANT CHANGE:  1992-11-12, new                   000117        19
LAST SIGNIFICANT CHANGE:  93 Feb, new                       000123        19
LAST SIGNIFICANT CHANGE:  1993-02-12                        000125        20

