User account creation filtered due to spam.
note that I submitted this bug before, but forgot some information.
the compiler stops with the following message (when trying to compile linux 2.4.21-rc2):
sched.c: In function `schedule':
sched.c:709: internal compiler error: in merge_assigned_reloads, at reload1.c:6134
some info about gcc:
--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 --disable-checking --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 -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=pentium3 -mcpu=pentium4 -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched -fno-omit-frame-pointer -c -o sched.o sched.c
I can confirm that this bug occurs with gcc 3.3 branch and mainline (20030521), but not with gcc
3.2.3. This makes this a regression, and considering that this is code in the linux kernel, I'd say it's
a rather serious regression. I've attached a reduced testcase (not positive if the testcase is legal,
but it causes exactly the same error as the original).
Created attachment 4050 [details]
*** Bug 10884 has been marked as a duplicate of this bug. ***
It's indeed a regression in 3.3 and 3.4, but I suspect the inline-asm is
invalid, since we get an error if no optimization is switched on.
g/x> /home/bangerth/bin/gcc-3.2.3-pre/bin/gcc -c x.c -O2
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/gcc -c x.c -O2
x.c: In function `schedule':
x.c:78: internal compiler error: in merge_assigned_reloads, at reload1.c:6134
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/gcc -c x.c
x.c: In function `schedule':
x.c:77: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
*** Bug 11007 has been marked as a duplicate of this bug. ***
Make the bug's summary more clear...
*** Bug 11053 has been marked as a duplicate of this bug. ***
thanks for looking at this. Just one quick question, when compiling the testcase without
optimization, gcc gives the following error:
junk.i: In function `schedule':
junk.i:77: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
Is this a bug in the testcase or gcc? Thanks,
The linux kernel must be compiled with optimization in order to work, because of
design choices, so the fact that the asm does not work without optimization is a
non-issue for the linux kernel folks.
I didn't look at this too closely, but my impression is that the asm is too
complicated to work without optimization. That is, it needs more registers than
are available when not optimizing.
Thanks Jim, I think that answers the question. Closing as FIXED...