public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/49590] New: ENTRY: Reject combining USE associated variable with RESULT variable
@ 2011-06-30 12:45 burnus at gcc dot gnu.org
  2011-06-30 15:11 ` [Bug fortran/49590] " kargl at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-06-30 12:45 UTC (permalink / raw)
  To: gcc-bugs

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."


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/49590] ENTRY: Reject combining USE associated variable with RESULT variable
  2011-06-30 12:45 [Bug fortran/49590] New: ENTRY: Reject combining USE associated variable with RESULT variable burnus at gcc dot gnu.org
@ 2011-06-30 15:11 ` kargl at gcc dot gnu.org
  2011-08-23 15:51 ` burnus at gcc dot gnu.org
  2015-10-13 13:41 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2011-06-30 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org 2011-06-30 15:10:15 UTC ---
I believe that it is the other addendum that makes the
code invalid.

Append new statement to 12.6.2.6p8 [310:20],
  "A name that appears as a <result-name> in an ENTRY statement
   shall not appear in any executable statement that precedes the
   first RESULT clause with that name."

The part you quote concerns "statement functions".  There are
no statement functions in your example.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/49590] ENTRY: Reject combining USE associated variable with RESULT variable
  2011-06-30 12:45 [Bug fortran/49590] New: ENTRY: Reject combining USE associated variable with RESULT variable burnus at gcc dot gnu.org
  2011-06-30 15:11 ` [Bug fortran/49590] " kargl at gcc dot gnu.org
@ 2011-08-23 15:51 ` burnus at gcc dot gnu.org
  2015-10-13 13:41 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-23 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-23 15:50:20 UTC ---
(In reply to comment #1)
> The part you quote concerns "statement functions".  There are
> no statement functions in your example.

Well spotted. The problem also occurs in the statement function case - at least
when the entry function does not set a return value - and -Wall also does not
warn in that case ...

  FUNCTION f()
   x(i) = i
   f = x(4)
  ENTRY e() RESULT(x)
!    x = 3
  END FUNCTION


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/49590] ENTRY: Reject combining USE associated variable with RESULT variable
  2011-06-30 12:45 [Bug fortran/49590] New: ENTRY: Reject combining USE associated variable with RESULT variable burnus at gcc dot gnu.org
  2011-06-30 15:11 ` [Bug fortran/49590] " kargl at gcc dot gnu.org
  2011-08-23 15:51 ` burnus at gcc dot gnu.org
@ 2015-10-13 13:41 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-13 13:41 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-13
     Ever confirmed|0                           |1

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at r228753 (trunk 6.0).


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-13 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 12:45 [Bug fortran/49590] New: ENTRY: Reject combining USE associated variable with RESULT variable burnus at gcc dot gnu.org
2011-06-30 15:11 ` [Bug fortran/49590] " kargl at gcc dot gnu.org
2011-08-23 15:51 ` burnus at gcc dot gnu.org
2015-10-13 13:41 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).