re PR debug/29558 (ICE in set_variable_part, at var-tracking.c:2140)
authorRichard Henderson <rth@redhat.com>
Mon, 19 Feb 2007 16:21:59 +0000 (08:21 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 19 Feb 2007 16:21:59 +0000 (08:21 -0800)
        PR debug/29558
        * var-tracking.c (track_expr_p): Disallow AGGREGATE_TYPE_P
        in memory.

From-SVN: r122131

gcc/ChangeLog
gcc/testsuite/gcc.dg/debug/pr29558.c [new file with mode: 0644]
gcc/var-tracking.c

index b5c4a67..6bf8954 100644 (file)
@@ -1,3 +1,9 @@
+2007-02-19  Richard Henderson  <rth@redhat.com>
+
+        PR debug/29558
+        * var-tracking.c (track_expr_p): Disallow AGGREGATE_TYPE_P
+        in memory.
+
 2007-02-19  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        * config/s390/s390.c (s390_call_saved_register_used,
diff --git a/gcc/testsuite/gcc.dg/debug/pr29558.c b/gcc/testsuite/gcc.dg/debug/pr29558.c
new file mode 100644 (file)
index 0000000..99386b3
--- /dev/null
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+
+void stpi_unpack_16_1(int length, unsigned char *out, unsigned char bit)
+{
+  unsigned char tempin;
+  unsigned char temp[16];
+  for (bit = 128; length > 0; length--) {
+    if (tempin & 128)
+      temp[0] |= bit;
+    else
+      {
+        *out++ = temp[1];
+        *out++ = temp[2];
+        *out++ = temp[3];
+        *out++ = temp[4];
+        *out++ = temp[5];
+        *out++ = temp[6];
+        *out++ = temp[7];
+        *out++ = temp[9];
+        *out++ = temp[10];
+        *out++ = temp[11];
+        *out++ = temp[12];
+        *out++ = temp[13];
+        *out++ = temp[14];
+        *out++ = temp[15];
+        __builtin_memset (temp, 0, 16);
+     }
+  }
+}
+
index 815faca..d9f21b5 100644 (file)
@@ -1529,7 +1529,8 @@ track_expr_p (tree expr)
   if (MEM_P (decl_rtl))
     {
       /* Do not track structures and arrays.  */
-      if (GET_MODE (decl_rtl) == BLKmode)
+      if (GET_MODE (decl_rtl) == BLKmode
+         || AGGREGATE_TYPE_P (TREE_TYPE (realdecl)))
        return 0;
       if (MEM_SIZE (decl_rtl)
          && INTVAL (MEM_SIZE (decl_rtl)) > MAX_VAR_PARTS)