[Bug libfortran/41335] VOLATILE in Fortran does not take effect

sgk at troutmask dot apl dot washington dot edu gcc-bugzilla@gcc.gnu.org
Fri Sep 11 22:39:00 GMT 2009



------- Comment #19 from sgk at troutmask dot apl dot washington dot edu  2009-09-11 22:39 -------
Subject: Re:  VOLATILE in Fortran does not take effect

On Fri, Sep 11, 2009 at 06:18:35PM -0000, kargl at gcc dot gnu dot org wrote:
> 
> program VolatileTest
>   double precision, volatile :: a
>   double precision :: uA, uB, b, c
>   real, volatile :: ra
>   real :: ruA, ruB, rb, rc
>   read(*,*) uA, uB, ruA, ruB
>   a = uA * uA
>   b = uB * uB
>   c = a - b
>   ra = ruA * ruA
>   rb = ruB * ruB
>   rc = ra - rb
>   print *, c, rb
> end program VolatileTest
> 

Minor correction.  The print statement should be

   print *, c, rc


-- 


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



More information about the Gcc-bugs mailing list