This is the mail archive of the gcc-patches@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]

[Committed] ICE caused by calling simplify_subreg with BLKmode


Hi,

> Patch is OK with that change.

Thanks. I've committed the attached patch.

Bye,

-Andreas-

Index: gcc/simplify-rtx.c
===================================================================
*** gcc/simplify-rtx.c.orig	2006-11-07 10:10:30.000000000 +0100
--- gcc/simplify-rtx.c	2006-11-09 18:45:25.000000000 +0100
*************** avoid_constant_pool_reference (rtx x)
*** 158,163 ****
--- 158,166 ----
        return x;
      }
  
+   if (GET_MODE (x) == BLKmode)
+     return x;
+ 
    addr = XEXP (x, 0);
  
    /* Call target hook to avoid the effects of -fpic etc....  */
Index: gcc/testsuite/gcc.dg/20061109-1.c
===================================================================
*** /dev/null	1970-01-01 00:00:00.000000000 +0000
--- gcc/testsuite/gcc.dg/20061109-1.c	2006-11-08 16:37:20.000000000 +0100
***************
*** 0 ****
--- 1,17 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1" } */
+ 
+ /* This assignment might be implemented with a mem copy from the
+    literal pool with two BLKmode operands.  This produced an ICE on S/390
+    since simplify_subreg was called for such a BLKmode operand.  */
+ 
+ struct a
+ {
+   unsigned int b:24;
+ };
+ 
+ void
+ foo (struct a *t)
+ {
+   t->b = 32;
+ }


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