This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/49590] New: ENTRY: Reject combining USE associated variable with RESULT variable


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49590

           Summary: ENTRY: Reject combining USE associated variable with
                    RESULT variable
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


>From http://j3-fortran.org/doc/meeting/195/11-196r1.txt:

The following is invalid:

MODULE m
  REAL x
CONTAINS
  FUNCTION f()
    f = 1
    x = 2  ! <<< Use associated?
    RETURN
  ENTRY e() RESULT(x)
    x = 3  ! <<<< Result variable?
  END FUNCTION
END MODULE

Append new statement to 12.6.2.6p9 [310:23]
  "A name that appears as a <result-name> in an ENTRY statement
   shall not appear in the expression of a statement function that
   precedes the first RESULT clause with that name unless the name is
   also a dummy argument of that statement function."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]