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; 3+ 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] 3+ messages in thread
* [Bug fortran/43289] Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram
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 ` pault at gcc dot gnu dot org
2010-05-07 18:06 ` dfranke at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-03-28 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2010-03-28 20:39 -------
(In reply to comment #0)
> 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
>
I can see why the LHS should be invalid but why the RHS?
I have confirmed it since it is manifestly 50% a bug! Note that ifort 11.1
does not detect it.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-03-28 20:39:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43289
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/43289] Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram
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
1 sibling, 0 replies; 3+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-07 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dfranke at gcc dot gnu dot org 2010-05-07 18:06 -------
*** Bug 39289 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43289
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-07 18:06 UTC | newest]
Thread overview: 3+ 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
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).