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

bug in -fschedule-insns and -O


-----BEGIN PGP SIGNED MESSAGE-----

while trying to tweak the performance of the Qt 2.0.1 library I have stubled
upon what I believe is a GCC bug. When trting to compile with options -O3
-march=pentiumpro -fschedule-insns -fschedule-insns2,  the Qt failed to
compile. After some playing around I boiled the options down to the following:
-fschedule-insns -O1 

When either -O1 (or -O) or -fschedule-insns was not specified, this error did
not occur.

This is the gcc output:

g++ -c -I/usr/lib/qt/include -I/usr/X11R6/include -pipe -v --save-temps -DNO_DEBUG -fschedule-insns -O1 -fPIC -I/usr/lib/qt/src/3rdparty/zlib -I/usr/lib/qt/src/3rdparty/libpng  -o widgets/qlabel.o widgets/qlabel.cpp
g++: Warning: -pipe ignored since -save-temps specified
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/specs
gcc version 2.95.1 19990816 (release)
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/cpp -lang-c++ -v -I/usr/lib/qt/include -I/usr/X11R6/include -I/usr/lib/qt/src/3rdparty/zlib -I/usr/lib/qt/src/3rdparty/libpng -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__PIC__ -D__pic__ -DNO_DEBUG widgets/qlabel.cpp qlabel.ii
GNU CPP version 2.95.1 19990816 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/qt/include
 /usr/X11R6/include
 /usr/lib/qt/src/3rdparty/zlib
 /usr/lib/qt/src/3rdparty/libpng
 /usr/lib/qt/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/../../../../include/g++-3
 /usr/local/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/../../../../i686-pc-linux-gnu/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/cc1plus qlabel.ii -quiet -dumpbase qlabel.cc -O1 -version -fschedule-insns -fPIC -o qlabel.s
GNU C++ version 2.95.1 19990816 (release) (i686-pc-linux-gnu) compiled by GNU C version 2.95.1 19990816 (release).
widgets/qlabel.cpp: In method `class QSize QLabel::sizeForWidth(int) const':
widgets/qlabel.cpp:554: fixed or forbidden register 0 (ax) was spilled for class AREG.
widgets/qlabel.cpp:554: This may be due to a compiler bug or to impossible asm
widgets/qlabel.cpp:554: statements or clauses.
widgets/qlabel.cpp:554: This is the instruction:
(insn 294 295 297 (parallel[ 
            (set (reg:SI 1 %edx)
                (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 2 %ecx))
                            (sign_extend:DI (reg:SI 1 %edx)))
                        (const_int 32 [0x20]))))
            (clobber (scratch:SI))
        ] ) 232 {smulsi3_highpart} (insn_list 291 (insn_list 293 (nil)))
    (expr_list:REG_DEAD (reg:SI 2 %ecx)
        (expr_list:REG_DEAD (reg:SI 1 %edx)
            (expr_list:REG_UNUSED (scratch:SI)
                (nil)))))
make: *** [widgets/qlabel.o] Error 1

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: h6gGXHG3s5j9Gl8zP7uGb/HuhK872ea1

iQA/AwUBN+dK4az3GZ0qtIKKEQLU/gCgor2lOEodCSEY8KFDC6WbewcMAYAAoIKO
vRp/BwjrxR585ZQlpwfHO1bG
=X5nN
-----END PGP SIGNATURE-----

qlabel.ii.bz2

qlabel.s.bz2


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