Jens Thoms Toerring
Wed, 27 Aug 2003 16:53:56 +0000
Hi,
I have been asking about the problem with searchd getting into
an infinite loop when searching for two words at once or for
phrases. Since some people seem to assume that this is a gcc
related problem I started doing a few tests to find pout what
happens when compiling with different optimization levels.
Here are my results:
-ggdb3 -> works
-g3 -> works
-g -> works
-g -O -> works
-g -O2 -> doesn't work, infinite loop
-g -O -fstrict-aliasing -> works
-g -O -fstrict-aliasing -fstrength-reduce -> works
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -> works
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -fschedule-insns -> compiler "crashes":
g++ -g -O -fstrict-aliasing -fstrength-reduce -fregmove \
-fschedule-insns -fschedule-insns2 -DHAVE_CONFIG_H -I. \
-I. -I../include -I../include -D_REENTRANT -c -o \
sqldbi.o `test -f 'sqldbi.cpp' || echo './'`sqldbi.cpp
sqldbi.cpp: In member function `void CSQLDatabaseI::LoadRanks(CUrlRanks&)':
sqldbi.cpp:1119: unable to find a register to spill in class `AREG'
sqldbi.cpp:1119: this is the insn:
(insn 11387 19709 11125 (parallel [
(set (reg:SI 1759)
(udiv:SI (reg/v:SI 1 edx [1710])
(reg:SI 2 ecx [1750])))
(set (reg:SI 2 ecx [1758])
(umod:SI (reg/v:SI 1 edx [1710])
(reg:SI 2 ecx [1750])))
(clobber (reg:CC 17 flags))
]) 277 {udivmodsi4} (insn_list 11335 (insn_list 11122 (nil)))
(expr_list:REG_DEAD (reg:SI 2 ecx [1750])
(expr_list:REG_UNUSED (reg:SI 1759)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))))
sqldbi.cpp:1119: confused by earlier errors, bailing out
make[2]: *** [sqldbi.o] Error 1
make[2]: Leaving directory `/home/jens/aspseek/aspseek-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jens/aspseek/aspseek-cvs/src'
make: *** [all-recursive] Error 1
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -fcaller-saves -> works
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -fcaller-saves \
-fmove-all-movables -fthread-jumps -> works
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -fcaller-saves \
-fmove-all-movables -fthread-jumps \
-fcse-follow-jumps -> works
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -fcaller-saves \
-fmove-all-movables -fthread-jumps \
-fcse-follow-jumps -frerun-loop-opt -> works
-g -O -fstrict-aliasing -fstrength-reduce \
-fregmove -fcaller-saves \
-fmove-all-movables -fthread-jumps \
-fcse-follow-jumps -frerun-loop-opt \
-fgcse -> doesn't works, infinite loop
-g -O -fgcse -> works
All this was tested with
[EMAIL PROTECTED]:~> g++ -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib
--enable-languages=c,c++,f77,objc,java,ada --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib
--enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2
on
[EMAIL PROTECTED]:~> uname -a
Linux ub3744 2.4.19-4GB #1 Fri Sep 13 13:14:56 UTC 2002 i686 unknown
Does anybody has an idea what all of this could mean? I only have
a very rudimentary understanding of what the flags may do (and for
some of them none at all), so I don't know where exactly to look
for or if it makes sense to try to get the GCC people to have a
look at this (but I would fully understand them if they would
prefer a simpler program exhibiting the problem) or has someone
experience what kind of (perhaps a bit fishy) code constructs might
lead to such problems...
Regards, Jens
--
Freie Universitaet Berlin Jens Thoms Toerring
Universitaetsbibliothek
Webteam Tel: 0049 30 838 56055
Garystrasse 39 Fax: 0049 30 838 53738
14195 Berlin e-mail: [EMAIL PROTECTED]