This is the mail archive of the gcc@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]

miscompilation of complex switch statement


When I compile qt-x11-free-3.3.3 with the actual snapshot using the options:
  -O3 --param max-gcse-passes=4 -floop-optimize2 -fmove-loop-invariants
I get get a miscompilation in the file sql_lex.cc in a very complex switch
statement which results in an error during linking:
  "undefined reference to .L968"

This error goes away when I ommit -floop-optimize2 -fmove-loop-invariants or
use -O2 or max-gcse-passes=3

Since the source to produce this error is too large (~ 100 .o files and 38
libraries are linking together) I did not file a bug report.

Maybe the combination of parameters doesn't make sense or is invalid, but my
goal was to stress the compiler by using parameters which might produce
better code.
(We have c++ programs where max-gcse-passes=5 is necessary to get fast code)

My question are:
Is this a valid combination of parameters and should that combination work?
Should I submit this as a bug report?


Michael Cieslinski


output gcc -v:
Reading specs from
/usr/local/gcc40a/lib/gcc/powerpc-unknown-linux-gnu/4.0.0/specs
Configured with: ../gcc40/configure --prefix=/usr/local/gcc40a
--program-suffix=40a --with-cpu=G5 --enable-altivec --enable-languages=c,c++
--enable-checking
Thread model: posix
gcc version 4.0.0 20041121 (experimental)

The source can be downloaded at:
http://www.trolltech.com/download/qt/x11.html

to compile I use CFLAGS and CXXFLAGS:
-pipe -g -O3 -mcpu=G5 -maltivec -mabi=altivec -fmessage-length=0
-falign-loops=16 -falign-jumps=16 -falign-functions=32 -fstrict-aliasing
-fsched-interblock --param max-gcse-passes=5 -ffast-math -funroll-all-loops
-funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -floop-optimize2
-fmove-loop-invariants -fgcse-after-reload -frename-registers

QT was configured with:
./configure --prefix=/home/cie019/mysql/mysql --enable-thread-safe-client


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