I was building SPEC 2006 with the options: -minline-all-stringops
-minline-stringops-dynamically in addition to my normal options. If you use
both options together, GCC generates the following error:
foo.c: In function spec_random_load:
foo.c:24: internal compiler error: in int_mode_for_mode, at stor-layout.c:258
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Tracing it down, emit_cmp_and_jump_insns is called to compare and jump with two
constant values:
Breakpoint 3, emit_cmp_and_jump_insns (x=0x2aaaadff3c50, y=0x2aaaadff3480,
comparison=LTU, size=0x0, mode=SImode, unsignedp=1, label=0x2aaaae134fa0)
at /proj/gcc/fsf-src/trunk/gcc/optabs.c:4428
(gdb) print x
$7 = (rtx) 0x2aaaadff3c50
(gdb) pr
(const_int 131072 [0x20000])
(gdb) print y
$8 = (rtx) 0x2aaaadff3480
(gdb) pr
(const_int 8 [0x8])
(gdb) up
#1 0x00000000008adab6 in ix86_expand_movmem (dst=0x2aaaae136a60,
src=0x2aaaae136a80, count_exp=0x2aaaadff3c50, align_exp=<value optimized out>,
expected_align_exp=<value optimized out>, expected_size_exp=<value
optimized out>) at /proj/gcc/fsf-src/trunk/gcc/config/i386/i386.c:15362
The failure comes because integer constants have VOIDmode type, rather than an
integer type.
Either emit_cmp_and_jump_insns should handle the constant/constant case, or
ix86_expand_movemem should not call emit_cmp_and_jump_insns with constant
tests.
--
Summary: GCC -O1 -minline-all-stringops -minline-stringops-
dynamically fails for spec 2006 bzip2, gobmk, and
h264ref benchmarks
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot meissner at amd dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34077