From: Rask Ingemann Lambertsen Date: Wed, 18 Jul 2007 13:47:28 +0000 (+0200) Subject: re PR target/32808 (cris: ICE: RTL check: expected elt 0 type 'e' or 'u', have 'w... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e19a50c89c2323781a390922f9cde317327231d;p=gcc.git re PR target/32808 (cris: ICE: RTL check: expected elt 0 type 'e' or 'u', have 'w' (rtx const_int) in cris_print_index, at config/cris/cris.c:499) PR target/32808 * config/cris/cris.c (cris_print_index): Don't use XEXP before checking that the operand is an expression. From-SVN: r126720 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e39ccd6a579..5cf388443ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-07-18 Rask Ingemann Lambertsen + + PR target/32808 + * config/cris/cris.c (cris_print_index): Don't use XEXP before + checking that the operand is an expression. + 2007-07-19 Christoph von Wittich Danny Smith diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 36537c54274..e233bc7fa42 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -496,8 +496,6 @@ cris_operand_lossage (const char *msgid, rtx op) static void cris_print_index (rtx index, FILE *file) { - rtx inner = XEXP (index, 0); - /* Make the index "additive" unless we'll output a negative number, in which case the sign character is free (as in free beer). */ if (!CONST_INT_P (index) || INTVAL (index) >= 0) @@ -514,8 +512,9 @@ cris_print_index (rtx index, FILE *file) putc (INTVAL (XEXP (index, 1)) == 2 ? 'w' : 'd', file); } - else if (GET_CODE (index) == SIGN_EXTEND && MEM_P (inner)) + else if (GET_CODE (index) == SIGN_EXTEND && MEM_P (XEXP (index, 0))) { + rtx inner = XEXP (index, 0); rtx inner_inner = XEXP (inner, 0); if (GET_CODE (inner_inner) == POST_INC) @@ -533,6 +532,7 @@ cris_print_index (rtx index, FILE *file) } else if (MEM_P (index)) { + rtx inner = XEXP (index, 0); if (GET_CODE (inner) == POST_INC) fprintf (file, "[$%s+].d", reg_names[REGNO (XEXP (inner, 0))]); else