From: Andrey Belevantsev Date: Thu, 19 Aug 2010 10:03:39 +0000 (+0400) Subject: re PR rtl-optimization/44691 (ICE: RTL check: expected code 'reg', have 'plus' in... X-Git-Tag: releases/gcc-4.6.0~4936 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e841c82c9daaacac3e73a20c2a32c75c2d1603d;p=thirdparty%2Fgcc.git re PR rtl-optimization/44691 (ICE: RTL check: expected code 'reg', have 'plus' in rhs_regno, at rtl.h:1050) PR rtl-optimization/44691 * sel-sched.c (count_occurrences_1): Also punt when SUBREG_REG is not a register. From-SVN: r163369 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff0e2c0bdf30..1b92353c49df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-08-19 Andrey Belevantsev + + PR rtl-optimization/44691 + * sel-sched.c (count_occurrences_1): Also punt when SUBREG_REG + is not a register. + 2010-08-19 Ian Bolton PR target/45070 diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 3a86e22feef4..534c55ca4704 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -835,7 +835,8 @@ count_occurrences_1 (rtx *cur_rtx, void *arg) if (GET_CODE (*cur_rtx) == SUBREG && REG_P (p->x) - && REGNO (SUBREG_REG (*cur_rtx)) == REGNO (p->x)) + && (!REG_P (SUBREG_REG (*cur_rtx)) + || REGNO (SUBREG_REG (*cur_rtx)) == REGNO (p->x))) { /* ??? Do not support substituting regs inside subregs. In that case, simplify_subreg will be called by validate_replace_rtx, and