This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43289] Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2010 20:39:01 -0000
- Subject: [Bug fortran/43289] Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram
- References: <bug-43289-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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