This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/41335] VOLATILE in Fortran does not take effect
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Sep 2009 22:39:01 -0000
- Subject: [Bug libfortran/41335] VOLATILE in Fortran does not take effect
- References: <bug-41335-18178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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