This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43289] Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]