This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
VOIDmode in ZERO_EXTEND crashed
- From: daniel tian <daniel dot xntian at gmail dot com>
- To: gcc at gcc dot gnu dot org, newlib at sources dot redhat dot com
- Cc: peng dot zheng at mavrixtech dot com, yingbo dot com at gmail dot com
- Date: Mon, 12 Oct 2009 18:16:57 +0800
- Subject: VOIDmode in ZERO_EXTEND crashed
hi, everyone:
I have ported the gcc to new RISC chip. But when I build the
newlib with it, the gcc crashed in simplify-rtx.c.
error message is like this:
../../../../../newlib-1.16.0/newlib/libc/time/tzset_r.c: In
function _tzset_r?
../../../../../newlib-1.16.0/newlib/libc/time/tzset_r.c:195:
internal compiler error: in simplify_const_unary_operation, at
simplify-rtx.c:1108
And the code there is simplify-rtx.c 1108:
case ZERO_EXTEND:
/* When zero-extending a CONST_INT, we need to know its
original mode. */
gcc_assert (op_mode != VOIDmode);
I tracked the gcc, It caused by the RTX (const_int 60). As I
know the CONST_INT is alway being VOIDmode.
I dumped the rtl tzset_r.c.161r.dce, and I think it caused by the
following rtx(because the there is const_int 60 in this rtx and the
register used is exactly what I saw in rtx which causes the gcc
crash):
(insn 229 228 230 21
../../../../../newlib-1.16.0/newlib/libc/time/tzset_r.c:78 (set
(reg:SI 181)
(mult:SI (zero_extend:SI (reg:HI 182 [ mm ]))
(zero_extend:SI (const_int 60 [0x3c])))) 63
{rice_umulhisi3} (expr_list:REG_DEAD (reg:HI 182 [ mm ])
(nil)))
And the problem is I don't know why it lead crashing.
PS: Does gcc have a function which could dump the specified rtx? I
wanna dump the rtx when the crash happening.
Can somebody give me some advice?
Any suggestion is appreciated.
Thanks.
daniel.