Quoting daniel tian <daniel.xnt...@gmail.com>:
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.
That exactly is the problem. You can't have a CONST_INT inside a
ZERO_EXTEND. That is not valid.
You'll need a separate pattern to recognize the CONST_INT without a
ZERO_EXTEND around it. Unfortunately, this will not give reload
the freedom it should have.