This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33638] optimization bug: wrong code with -fforce-addr
- From: "manfred99 at gmx dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2007 09:36:24 -0000
- Subject: [Bug middle-end/33638] optimization bug: wrong code with -fforce-addr
- References: <bug-33638-9562@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from manfred99 at gmx dot ch 2007-10-05 09:36 -------
Ok, I managed to produce a testcase: a wrapper around the miscompiled
function and all the missing routines. Input data is read from a binary file,
so the program has to be run on a x86 machine (littleendian).
I attach a tar file with all these things, including program output of a
good and a bad run.
good.out is an output of
# gcc -O2 -march=pentium4 -c mova2i.c
# gfortran -O2 -march=pentium4 -o main main.f \
comunpack.f rdieee.f gbytesc.f mova2i.o
# ./main > good.out
bad.out likewise, but with "-O2 -march=pentium4 -fforce-addr" (the
additional flag only matters to comunpack.f, the other routines seem
not to be affected and can be compiled arbitrarily).
Hope this helps.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33638