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 middle-end/36447] simplify_subreg ICE with right shift more than length type AVR



------- Comment #2 from bonzini at gnu dot org  2008-06-06 05:04 -------
Can you try and possibly submit this patch:

Index: /Users/bonzinip/cvs/gcc/gcc/simplify-rtx.c
===================================================================
--- /Users/bonzinip/cvs/gcc/gcc/simplify-rtx.c  (revision 134435)
+++ /Users/bonzinip/cvs/gcc/gcc/simplify-rtx.c  (working copy)
@@ -5247,6 +5247,7 @@ simplify_subreg (enum machine_mode outer
       && GET_MODE_BITSIZE (innermode) >= (2 * GET_MODE_BITSIZE (outermode))
       && GET_CODE (XEXP (op, 1)) == CONST_INT
       && (INTVAL (XEXP (op, 1)) & (GET_MODE_BITSIZE (outermode) - 1)) == 0
+      && INTVAL (XEXP (op, 1)) < GET_MODE_BITSIZE (innermode)
       && byte == subreg_lowpart_offset (outermode, innermode))
     {
       int shifted_bytes = INTVAL (XEXP (op, 1)) / BITS_PER_UNIT;

Thanks!


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-06 05:04:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36447


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