This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/18420] [4.0 Regression] ICE compiling mesa at -O2
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Nov 2004 00:48:03 -0000
- Subject: [Bug rtl-optimization/18420] [4.0 Regression] ICE compiling mesa at -O2
- References: <20041110164413.18420.jgrimm2@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-11 00:47 -------
This patch fixes it:
Index: simplify-rtx.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.207
diff -u -p -r1.207 simplify-rtx.c
--- simplify-rtx.c 28 Oct 2004 12:47:21 -0000 1.207
+++ simplify-rtx.c 11 Nov 2004 00:47:26 -0000
@@ -3790,7 +3790,8 @@ simplify_gen_subreg (enum machine_mode o
return newx;
if (GET_CODE (op) == SUBREG || GET_MODE (op) == VOIDmode
- || (REG_P (op) && REGNO (op) < FIRST_PSEUDO_REGISTER))
+ || (REG_P (op) && REGNO (op) < FIRST_PSEUDO_REGISTER
+ && GET_MODE_SIZE (innermode) != GET_MODE_SIZE (innermode)))
return NULL_RTX;
return gen_rtx_SUBREG (outermode, op, byte);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18420