This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32391] Wrong code with optimization on i686-pc-linux-gnu
- From: "sunjoong at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jun 2007 03:27:41 -0000
- Subject: [Bug fortran/32391] Wrong code with optimization on i686-pc-linux-gnu
- References: <bug-32391-14714@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from sunjoong at gmail dot com 2007-06-21 03:27 -------
I appreciate kargl's comments; they were helpful.
I had known there is VOLATILE attribute in new Fortran standard
but I had worked with "LEGACY" fortran77 program!
I'll write C code if I shuld write one; that is more compatable for me.
However there are many legacy fortran 77 code in my field
and I don't want to rewrite it.
Small adjustment like '-ffloat-store'
when compiling by gfortran instead of pgf77
is acceptable
for I understood the behavior of register kargl told me.
(I had read Goldberg's briefly but that is not point.)
I had ONLY HOPEd VOLATILE statement in fortran 77 EXTENSION of gfortran.
I thought that would be convenient
on small modification of legacy fortran 77 program.
(In reply to comment #17)
> You need to update the Fortran Standard that you use. Fortran
> 77 hasn't been the standard since about 1990. In fact, you're
> 3 standard been! There was Fortran 90, which was replaced by
> Fortran 95, which was replaced by Fortran 2003. Fortran 2003
> has the VOLATILE attribute and VOLATILE statement. Guess what??
> No, go ahead and guess! gfortran supports this feature.
>
> You need to go read Goldberg's paper about floating point arithmetic.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32391