[Bug fortran/43289] New: Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 8 12:36:00 GMT 2010
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
More information about the Gcc-bugs
mailing list