This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/18420] [4.0 Regression] ICE compiling mesa at -O2


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]