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 libfortran/41335] VOLATILE in Fortran does not take effect



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


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