public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57663] New: Arithmetic error with -fPIC -O
@ 2013-06-20 16:32 bardeau at iram dot fr
  2013-06-20 16:57 ` [Bug fortran/57663] " mikael at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bardeau at iram dot fr @ 2013-06-20 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57663
           Summary: Arithmetic error with -fPIC -O
           Product: gcc
           Version: 4.6.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bardeau at iram dot fr

Created attachment 30328
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30328&action=edit
Print is incorrect with gfortran 4.6.4

Dear gfortran developers,

the attached Fortran program fails to make a correct comparison and then prints
an erroneous value if compiled as follows with gfortran 4.6.4:

home/bardeau> gfortran -fPIC -O test.f90 -o test && ./test
 >>>  -5.71989641833856102E-002

This is true for gfortran 4.6.3 and 4.6.4 with options -fPIC and -O. gfortran
4.7.0 and above do not seem affected. Under normal conditions, the printout
should be:

home/bardeau> gfortran test.f90 -o test && ./test
 >>>   0.20000000000000001

I use gfortran 4.6.4 which I compiled myself (see below). However, I was first
reported this bug under Ubuntu 12.04.2 LTS 64 bit with gfortran 4.6.3-1ubuntu5.

It seems that the gcc 4.6 branch is still receiving bug fixes, so could you
have a look?

Thank you,

Sebastien


home/bardeau> uname -a
Linux bardeau 2.6.32-358.2.1.el6.x86_64 #1 SMP Tue Mar 12 14:18:09 CDT 2013
x86_64 x86_64 x86_64 GNU/Linux

home/bardeau> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/bardeau/Softs/gcc-4.6.4/libexec/gcc/x86_64-unknown-linux-gnu/4.6.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --with-gmp=/home/bardeau/Softs
--prefix=/home/bardeau/Softs/gcc-4.6.4 --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.6.4 (GCC)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-04 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 16:32 [Bug fortran/57663] New: Arithmetic error with -fPIC -O bardeau at iram dot fr
2013-06-20 16:57 ` [Bug fortran/57663] " mikael at gcc dot gnu.org
2013-06-21  7:42 ` bardeau at iram dot fr
2013-06-21  8:21 ` dominiq at lps dot ens.fr
2013-07-04 12:11 ` bardeau at iram dot fr
2013-07-04 14:51 ` dominiq at lps dot ens.fr
2013-07-04 15:16 ` bardeau at iram dot fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).