public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18628] New: miscompilation of complex switch statement
@ 2004-11-23 15:13 micis at gmx dot de
  2004-11-23 15:15 ` [Bug tree-optimization/18628] " micis at gmx dot de
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: micis at gmx dot de @ 2004-11-23 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

-- 
           Summary: miscompilation of complex switch statement
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: micis at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-unknown-linux-gnu
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


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


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

end of thread, other threads:[~2005-03-14 23:43 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 15:13 [Bug tree-optimization/18628] New: miscompilation of complex switch statement micis at gmx dot de
2004-11-23 15:15 ` [Bug tree-optimization/18628] " micis at gmx dot de
2004-11-23 15:17 ` [Bug middle-end/18628] " pinskia at gcc dot gnu dot org
2004-11-23 15:39 ` reichelt at gcc dot gnu dot org
2004-11-23 16:11 ` [Bug middle-end/18628] [4.0 regression] " reichelt at gcc dot gnu dot org
2004-11-23 16:16 ` reichelt at gcc dot gnu dot org
2004-11-23 16:34 ` reichelt at gcc dot gnu dot org
2004-11-23 16:53 ` [Bug middle-end/18628] [4.0 regression] miscompilation of switch statement in loop reichelt at gcc dot gnu dot org
2004-11-23 17:09 ` pinskia at gcc dot gnu dot org
2004-11-23 17:13 ` pinskia at gcc dot gnu dot org
2004-11-23 17:22 ` pinskia at gcc dot gnu dot org
2004-11-23 17:38 ` pinskia at gcc dot gnu dot org
2004-11-23 17:49 ` pinskia at gcc dot gnu dot org
2004-11-23 18:15 ` pinskia at gcc dot gnu dot org
2004-11-28 18:02 ` roger at eyesopen dot com
2004-12-15 12:30 ` steven at gcc dot gnu dot org
2004-12-15 13:54 ` steven at gcc dot gnu dot org
2004-12-15 14:11 ` pinskia at gcc dot gnu dot org
2004-12-15 23:52 ` giovannibajo at libero dot it
2004-12-16  7:52 ` micis at gmx dot de
2005-01-05 17:09 ` steven at gcc dot gnu dot org
2005-01-07 10:24 ` reichelt at gcc dot gnu dot org
2005-02-13 18:50 ` neroden at gcc dot gnu dot org
2005-03-09 10:19 ` [Bug middle-end/18628] [4.0/4.1 " aoliva at gcc dot gnu dot org
2005-03-09 10:31 ` aoliva at redhat dot com
2005-03-09 16:14 ` roger at eyesopen dot com
2005-03-10 13:47 ` [Bug rtl-optimization/18628] " rth at gcc dot gnu dot org
2005-03-10 20:38 ` aoliva at redhat dot com
2005-03-10 23:00 ` pluto at pld-linux dot org
2005-03-10 23:13 ` pinskia at gcc dot gnu dot org
2005-03-11  0:52 ` law at redhat dot com
2005-03-11 12:45 ` rth at gcc dot gnu dot org
2005-03-14 20:07 ` cvs-commit at gcc dot gnu dot org
2005-03-14 20:33 ` cvs-commit at gcc dot gnu dot org
2005-03-14 23:43 ` aoliva at gcc dot gnu dot org

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).