Building sh-elf with 110879 fails:
make[8]: Entering directory
`/home/hp/combined/sh-sim/sh-elf/m2a/newlib/libc/misc'
/home/hp/combined/sh-sim/./gcc/xgcc -B/home/hp/combined/sh-sim/./gcc/ -nostdinc
-B/home/hp/combined/sh-sim/sh-elf/m2a/newlib/ -is\
ystem /home/hp/combined/sh-sim/sh-elf/m2a/newlib/targ-include -isystem
/home/hp/combined/combined/newlib/libc/include -B/usr/loca\
l/sh-elf/bin/ -B/usr/local/sh-elf/lib/ -isystem /usr/local/sh-elf/include
-isystem /usr/local/sh-elf/sys-include -L/home/hp/combi\
ned/sh-sim/./ld  -m2a -DPACKAGE=\"newlib\" -DVERSION=\"1.14.0\"  -I.
-I/home/hp/combined/combined/newlib/libc/misc  -O2 -DHAVE_GE\
TTIMEOFDAY -fno-builtin      -O2 -g -O2   -m2a -c
/home/hp/combined/combined/newlib/libc/misc/dprintf.c
/home/hp/combined/combined/newlib/libc/misc/dprintf.c: In function '__dprintf':
/home/hp/combined/combined/newlib/libc/misc/dprintf.c:151: internal compiler
error: in int_mode_for_mode, at stor-layout.c:250

Same behavior, slightly different case:
#5  0x0819ec9d in move_invariant_reg (loop=0x40155918, invno=1074501252) at
/home/hp/combined/combined/gcc/loop-invariant.c:1105
      set = single_set (inv->insn);
      reg = gen_reg_rtx (GET_MODE (SET_DEST (set)));
=>    emit_insn_after (gen_move_insn (SET_DEST (set), reg), inv->insn);
(gdb) p inv->insn
$3 = 0x400c2888
(gdb) pr
(jump_insn 155 504 160 15
/home/hp/combined/combined/newlib/libc/misc/dprintf.c:99 (parallel [
            (set (pc)
                (plus:SI (reg:SI 315)
                    (label_ref/s 0)))
            (use (label_ref 157))
        ]) 245 {casesi_jump_2} (nil)
    (nil))
(gdb) bt
#0  fancy_abort (file=0x84c5e9c "/home/hp/combined/combined/gcc/stor-layout.c",
line=250,
    function=0x84c5ca2 "int_mode_for_mode") at
/home/hp/combined/combined/gcc/diagnostic.c:642
#1  0x082fdef2 in int_mode_for_mode (mode=VOIDmode) at
/home/hp/combined/combined/gcc/stor-layout.c:250
#2  0x081eb58a in emit_move_via_integer (mode=VOIDmode, x=0x4001a000,
y=0x40157bb0, force=0 '\0')
    at /home/hp/combined/combined/gcc/expr.c:2829
#3  0x081ebd5d in emit_move_insn_1 (x=0x4001a000, y=0x40157bb0) at
/home/hp/combined/combined/gcc/expr.c:3154
#4  0x0829e6b4 in gen_move_insn (x=0x4001a000, y=0x40157bb0) at
/home/hp/combined/combined/gcc/optabs.c:4398
#5  0x0819ec9d in move_invariant_reg (loop=0x40155918, invno=1074501252) at
/home/hp/combined/combined/gcc/loop-invariant.c:1105
#6  0x0819ed27 in move_invariants (loop=0x85abd28) at
/home/hp/combined/combined/gcc/loop-invariant.c:1152
#7  0x0819ee57 in move_single_loop_invariants (loop=0x85abd28) at
/home/hp/combined/combined/gcc/loop-invariant.c:1209
#8  0x0819eecd in move_loop_invariants (loops=0x856d9f0) at
/home/hp/combined/combined/gcc/loop-invariant.c:1243
#9  0x0817b471 in rtl_move_loop_invariants () at
/home/hp/combined/combined/gcc/loop-init.c:252
#10 0x083332ba in execute_one_pass (pass=0x84f0060) at
/home/hp/combined/combined/gcc/passes.c:853
#11 0x08333399 in execute_pass_list (pass=0x84f0060) at
/home/hp/combined/combined/gcc/passes.c:897
#12 0x083333bd in execute_pass_list (pass=0x84effa0) at
/home/hp/combined/combined/gcc/passes.c:898
#13 0x083333bd in execute_pass_list (pass=0x84f1700) at
/home/hp/combined/combined/gcc/passes.c:898
#14 0x080c67de in tree_rest_of_compilation (fndecl=0x400b0300) at
/home/hp/combined/combined/gcc/tree-optimize.c:412
#15 0x0805aad4 in c_expand_body (fndecl=0x400b0300) at
/home/hp/combined/combined/gcc/c-decl.c:6689
#16 0x0837e35c in cgraph_expand_function (node=0x400b0380) at
/home/hp/combined/combined/gcc/cgraphunit.c:1101
#17 0x0837e4e0 in cgraph_expand_all_functions () at
/home/hp/combined/combined/gcc/cgraphunit.c:1166
#18 0x0837ec02 in cgraph_optimize () at
/home/hp/combined/combined/gcc/cgraphunit.c:1434
#19 0x0805c4ae in c_write_global_declarations () at
/home/hp/combined/combined/gcc/c-decl.c:7804
#20 0x0830777e in compile_file () at
/home/hp/combined/combined/gcc/toplev.c:1012
#21 0x083095d3 in do_compile () at /home/hp/combined/combined/gcc/toplev.c:1944
#22 0x08309635 in toplev_main (argc=18, argv=0xbffffbe4) at
/home/hp/combined/combined/gcc/toplev.c:1976
Please stand back while preprocessed code is being attached.


-- 
           Summary: [4.2 regression] sh-elf broken:
                    newlib/libc/misc/dprintf.c int_mode_for_mode ICE loop-
                    invariant
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
GCC target triplet: sh-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26248

Reply via email to