diff options
author | Rask Ingemann Lambertsen <rask@sygehus.dk> | 2007-07-18 15:47:28 +0200 |
---|---|---|
committer | Rask Ingemann Lambertsen <rask@gcc.gnu.org> | 2007-07-18 13:47:28 +0000 |
commit | 9e19a50c89c2323781a390922f9cde317327231d (patch) | |
tree | 603e3df7ed0771d74018dc06f4123117b6af6572 | |
parent | b8a1094360a08b81f7ce63e48fdef03f12241b43 (diff) | |
download | gcc-9e19a50c89c2323781a390922f9cde317327231d.zip gcc-9e19a50c89c2323781a390922f9cde317327231d.tar.gz gcc-9e19a50c89c2323781a390922f9cde317327231d.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/cris/cris.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e39ccd6..5cf3884 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-07-18 Rask Ingemann Lambertsen <rask@sygehus.dk> + + 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 <Christoph_vW@reactos.org> Danny Smith <dannysmith@users.sourceforge.net> diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 36537c5..e233bc7 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 |