[Bug target/18592] [3.3/3.4 regression] [m68k] ICE in output_operand: invalid expression as operand
------- Additional Comments From bernie at develer dot com 2004-12-13 09:29 -------
It happens both on ColdFire and 680x0 (x>=2), but not
on 68000.
output_addr_const() gets passed a TRUNCATE (HImode) rtx.
I could find it in the last dump before the ICE:
(insn 87 45 127 3 (set (reg:HI 0 %d0 [35])
(const:HI (truncate:HI (minus:SI (label_ref:SI 11)
(label_ref:SI 54))))) 28 {*m68k.md:784} (nil)
(insn_list:REG_LABEL 11 (insn_list:REG_LABEL 54 (nil))))
The pattern definition in m68k.md is:
(define_insn ""
[(set (match_operand:HI 0 "nonimmediate_operand" "=g")
(match_operand:HI 1 "general_src_operand" "gS"))]
"!TARGET_COLDFIRE"
"* return output_move_himode (operands);")
It seems output_move_himode() inappropriately lets the
TRUNCATE pass through, but since the instruction being
generater is a move.l, the only place in output_move_himode()
where this could have happened is:
else if (CONSTANT_P (operands[1]))
return "move%.l %1,%0";
I don't know how to fix it, this is all I could do.
The full GDB backtrace is:
#0 output_addr_const (file=0x82b7b50, x=0xb7fa94f0) at
/usr/local/src/uclinux-tools/gcc-3.4.3/gcc/final.c:3276
#1 0x080fa36e in output_addr_const (file=0x82b7b50, x=0xb7fa94f8)
at /usr/local/src/uclinux-tools/gcc-3.4.3/gcc/final.c:3202
#2 0x081d575e in print_operand ()
#3 0x080fa26b in output_operand (x=0xb7fa94f8, code=0) at
/usr/local/src/uclinux-tools/gcc-3.4.3/gcc/final.c:3145
#4 0x080fa03c in output_asm_insn (template=0x8246011 "move%.l %1,%0",
operands=0x828ec20)
at /usr/local/src/uclinux-tools/gcc-3.4.3/gcc/final.c:3071
#5 0x080f9105 in final_scan_insn (insn=0xb7ff6820, file=0x82b7b50, optimize=2,
prescan=0, nopeepholes=0,
seen=0xbffff4fc) at /usr/local/src/uclinux-tools/gcc-3.4.3/gcc/final.c:2449
#6 0x080f7de7 in final (first=0xb7ff32c0, file=0x82b7b50, optimize=2, prescan=0)
at /usr/local/src/uclinux-tools/gcc-3.4.3/gcc/final.c:1572
#7 0x081b8461 in rest_of_compilation ()
#8 0x081d81a2 in tree_rest_of_compilation ()
#9 0x08059ba2 in c_expand_body_1 ()
#10 0x081d937b in cgraph_expand_function ()
#11 0x081da690 in cgraph_optimize ()
#12 0x0807dd51 in c_objc_common_finish_file ()
#13 0x081b9c44 in toplev_main ()
#14 0x0808da4b in main ()
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18592
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
Reply to: