This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Instruction scheduler bug (?) in gcc-2.95.2
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Subject: Instruction scheduler bug (?) in gcc-2.95.2
- From: "Weininger, Nicholas (MN65)" <weininger_nicholas at htc dot honeywell dot com>
- Date: Thu, 22 Jun 2000 16:01:58 -0500
When I invoke gcc 2.95.2 on the attached preprocessed file, with the options
shown below, I get the error output shown below.
As there are no asm directives in the preprocessed file, I believe this to
be a compiler bug.
The error output does not occur if I compile with -O1 alone, or with -O2 or
-O3 alone-- only if I combine -O1 and -fschedule-insns; thus the hypothesis
about the bug in the subject line.
I'm using Mumit Khan's 2.95.2 package for Cygwin B20 under WinNT 4.0. I have
made no modifications to the compiler; I got the package in binary form from
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95.2/
(Note: the preprocessed file is originally derived from some proprietary
code; thus it has been sliced down and obfuscated somewhat in order to
remove IP while retaining the ability to generate the bug, as well as to
shorten it for mailing. Sorry about that).
Please send replies to nicholas.weininger@honeywell.com
Thanks,
Nicholas Weininger
Honeywell Technology Center
nicholas.weininger@honeywell.com
Command line invocation of gcc:
gcc -Wall -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -W -fno-exceptions
-fno-rtti -fcheck-new -march=i586 -O1 -fschedule-insns -nostdinc -c -o
bugex.o bugex.ii
Result of invoking gcc:
bugex.cpp: In function `static void Foobar::initializeIdleThing()':
bugex.cpp:345: fixed or forbidden register 0 (ax) was spilled for class
AREG.
bugex.cpp:345: This may be due to a compiler bug or to impossible asm
bugex.cpp:345: statements or clauses.
bugex.cpp:345: This is the instruction:
(insn/i 185 166 145 (parallel[
(set (reg:SI 1 %edx)
(udiv:SI (reg:SI 3 %ebx)
(mem/s:SI (reg:SI 1 %edx) 0)))
(set (reg:SI 3 %ebx)
(umod:SI (reg:SI 3 %ebx)
(mem/s:SI (reg:SI 1 %edx) 0)))
] ) 243 {udivmodsi4} (insn_list 165 (insn_list/j/c:REG_DEP_ANTI 143
(ins
n_list/j/c 166 (nil))))
(expr_list:REG_DEAD (reg:SI 3 %ebx)
(expr_list:REG_DEAD (reg:SI 1 %edx)
(expr_list:REG_UNUSED (reg:SI 3 %ebx)
(nil)))))
<<bugex.ii>>
bugex.ii