public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43289]  New: Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram
@ 2010-03-08 12:36 burnus at gcc dot gnu dot org
  2010-03-28 20:39 ` [Bug fortran/43289] " pault at gcc dot gnu dot org
  2010-05-07 18:06 ` dfranke at gcc dot gnu dot org
  0 siblings, 2 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-03-08 12:36 UTC (permalink / raw)
  To: gcc-bugs

Fortran 2003 (corrigendum 5, ftp://ftp.nag.co.uk/sc22wg5/N1801-N1850/N1815.pdf)
has now:

Subclause 12.6
Following constraint C1271, add the following new constraint:

   C1271a The designator of a variable with the VOLATILE attribute shall not
   appear in a pure subprogram.

"A designator is a name followed by zero or more component selectors, array
section selectors, array element selectors, and substring selectors."


My understanding is that thus the following program is invalid:

pure subroutine foo(a, c, d)
  integer, volatile, intent(inout) :: a, c ! OK
  integer, volatile :: b ! OK
  integer :: d
  b = 4 ! Invalid LHS as "b" is volatile
  d = b ! Invalid RHS
end subroutine


-- 
           Summary: Missed constraint C1271a: Referrencing VOLATILE variable
                    in PURE subprogram
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <bug-43289-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-12-11 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 12:36 [Bug fortran/43289] New: Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram burnus at gcc dot gnu dot org
2010-03-28 20:39 ` [Bug fortran/43289] " pault at gcc dot gnu dot org
2010-05-07 18:06 ` dfranke at gcc dot gnu dot org
     [not found] <bug-43289-4@http.gcc.gnu.org/bugzilla/>
2011-12-11  9:41 ` tkoenig at gcc dot gnu.org
2011-12-11 17:27 ` burnus at gcc dot gnu.org

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