This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ICE in subreg_offset_representable_p


find_equiv_reg calls operand_subword on a XFmode const_double, but
subreg_offset_representable_p doesn't like that.

Andreas.

$ cat qefgcvt_r.i
void
qfcvt_r (long double value, int *decpt)
{
  if (*decpt == 1 && value != 0.0)
    --*decpt;
}
$ m68k-linux-gcc -O2 -c qefgcvt_r.i -v
Reading specs from /usr/local/m68k-linux/lib/gcc-lib/m68k-linux/3.4/specs
Configured with: ../gcc/configure --host=powerpc-linux --prefix=/usr/local/m68k-linux --enable-languages=c,c++ --target=m68k-linux --enable-shared --enable-clocale=gnu --enable-__cxa_atexit --with-as=/usr/local/m68k-linux/m68k-linux/bin/as --with-ld=/usr/local/m68k-linux/m68k-linux/bin/ld --with-gcc-version-trigger=/home/andreas/src/gcc/gcc/gcc/version.c --no-create --no-recursion
Thread model: posix
gcc version 3.4 20030426 (experimental)
 /usr/local/m68k-linux/lib/gcc-lib/m68k-linux/3.4/cc1 -fpreprocessed qefgcvt_r.i -quiet -dumpbase qefgcvt_r.i -auxbase qefgcvt_r -O2 -version -o /tmp/cckgpch4.s
GNU C version 3.4 20030426 (experimental) (m68k-linux)
	compiled by GNU C version 3.3 20030328 (prerelease) (SuSE Linux).
GGC heuristics: --param ggc-min-expand=46 --param ggc-min-heapsize=31787
qefgcvt_r.i: In function `qfcvt_r':
qefgcvt_r.i:6: internal compiler error: in subreg_offset_representable_p, at rtlanal.c:3442
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  fancy_abort (file=0x1034224c "../../gcc/gcc/rtlanal.c", line=3442, function=0x103431a4 "subreg_offset_representable_p") at ../../gcc/gcc/diagnostic.c:1367
#1  0x10237168 in subreg_offset_representable_p (xregno=16, xmode=XFmode, offset=0, ymode=SImode) at ../../gcc/gcc/rtlanal.c:3442
#2  0x100e1f3c in subreg_hard_regno (x=0x3048f400, check_mode=0) at ../../gcc/gcc/emit-rtl.c:1085
#3  0x102406bc in simplify_subreg (outermode=SImode, op=0x304864f0, innermode=VOIDmode, byte=0) at ../../gcc/gcc/simplify-rtx.c:2918
#4  0x10240a84 in simplify_gen_subreg (outermode=SImode, op=0x304864f0, innermode=271856036, byte=0) at ../../gcc/gcc/simplify-rtx.c:2998
#5  0x100e3974 in operand_subword (op=Cannot access memory at address 0xc
) at ../../gcc/gcc/emit-rtl.c:1741
#6  0x10219318 in find_equiv_reg (goal=0x3044c210, insn=0x304888d0, class=GENERAL_REGS, other=-1, reload_reg_p=0x0, goalreg=0, mode=SImode) at ../../gcc/gcc/reload.c:6466
#7  0x10225cb8 in choose_reload_regs (chain=0x103ce220) at ../../gcc/gcc/reload1.c:5661
#8  0x1022246c in reload_as_needed (live_known=0) at ../../gcc/gcc/reload1.c:3918
#9  0x1021cdac in reload (first=0x30488540, global=1) at ../../gcc/gcc/reload1.c:1105
#10 0x102df6a8 in global_alloc (file=0x103a0000) at ../../gcc/gcc/global.c:585
#11 0x1025ce44 in rest_of_compilation (decl=0x30487cb0) at ../../gcc/gcc/toplev.c:3433
#12 0x10024ab0 in c_expand_body_1 (fndecl=0x30487cb0, nested_p=3442) at ../../gcc/gcc/c-decl.c:6379
#13 0x10024488 in finish_function (nested=272039936, can_defer_p=1) at ../../gcc/gcc/c-decl.c:6245
#14 0x100039fc in yyparse () at c-parse.y:406
#15 0x10054b68 in c_common_parse_file (set_yydebug=271852108) at ../../gcc/gcc/c-opts.c:1630
#16 0x1025b068 in compile_file () at ../../gcc/gcc/toplev.c:2204
#17 0x10260fd8 in do_compile () at ../../gcc/gcc/toplev.c:5579
#18 0x10261060 in toplev_main (argc=3, argv=0x7ffff3a4) at ../../gcc/gcc/toplev.c:5610
#19 0x10079fb4 in main (argc=271852108, argv=0xd72) at ../../gcc/gcc/main.c:37
(gdb) f 6
#6  0x10219318 in find_equiv_reg (goal=0x3044c210, insn=0x304888d0, class=GENERAL_REGS, other=-1, reload_reg_p=0x0, goalreg=0, mode=SImode) at ../../gcc/gcc/reload.c:6466
(gdb) pr goal
(const_int 0 [0x0])
(gdb) pr insn
(insn 21 30 24 2 0x304884e0 (set (mem:SI (reg/v/f:SI 8 %a0 [orig:30 decpt ] [30]) [4 S4 A16])
        (const_int 0 [0x0])) 28 {movsi_const0} (nil)
    (expr_list:REG_DEAD (reg/v/f:SI 8 %a0 [orig:30 decpt ] [30])
        (nil)))
(gdb) pr p
(insn 13 28 14 1 0x304884e0 (set (reg:XF 16 %fp0 [32])
        (float_extend:XF (const_double:SF 0 [0x0] 0.0 [0x0.0p+0]))) 394 {extendsfxf2} (nil)
    (expr_list:REG_EQUIV (const_double:XF 0 [0x0] 0.0 [0x0.0p+0])
        (nil)))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]