From: Alexandre Oliva Date: Sat, 2 Apr 2005 16:56:27 +0000 (+0000) Subject: re PR middle-end/20491 (internal compiler error: in subreg_regno_offset, at rtlanal... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbe3791247584e9b520a0a7afdc14acea321678a;p=gcc.git re PR middle-end/20491 (internal compiler error: in subreg_regno_offset, at rtlanal.c:3042) PR middle-end/20491 * final.c (alter_subreg): Don't call subreg_regno for a non-REG. From-SVN: r97444 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9f53e008cf..d03fcf914f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-02 Alexandre Oliva + + PR middle-end/20491 + * final.c (alter_subreg): Don't call subreg_regno for a non-REG. + 2005-04-02 Alexandre Oliva PR rtl-optimization/20290 diff --git a/gcc/final.c b/gcc/final.c index ea842550cfb..aee4ea973fd 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2547,11 +2547,10 @@ alter_subreg (rtx *xp) if (new != 0) *xp = new; - else + else if (REG_P (y)) { /* Simplify_subreg can't handle some REG cases, but we have to. */ unsigned int regno = subreg_regno (x); - gcc_assert (REG_P (y)); *xp = gen_rtx_REG_offset (y, GET_MODE (x), regno, SUBREG_BYTE (x)); } }