]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/43317 (ICE: Segmentation fault with -fipa-struct-reorg -g)
authorRichard Biener <rguenth@gcc.gnu.org>
Mon, 15 Mar 2010 13:05:05 +0000 (13:05 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 15 Mar 2010 13:05:05 +0000 (13:05 +0000)
2010-03-15  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/43317
* ipa-struct-reorg.c (create_new_general_access): Update stmt.

* gcc.dg/pr43317.c: New testcase.

From-SVN: r157457

gcc/ChangeLog
gcc/ipa-struct-reorg.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr43317.c [new file with mode: 0644]

index fcb54526627f73b87266e214ca6711204f2bd1f2..bd0736436c83753de31bfb7d47d12ba7b7c53a7b 100644 (file)
@@ -1,6 +1,11 @@
+2010-03-15  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/43317
+       * ipa-struct-reorg.c (create_new_general_access): Update stmt.
+
 2010-03-15  Martin Jambor  <mjambor@suse.cz>
 
-       PR tree/optimization/43141
+       PR tree-optimization/43141
        * tree-sra.c (create_abstract_origin): New function.
        (modify_function): Call create_abstract_origin.
 
index e0336aa1a134ad62e2ab6e320f75edb30b6decf0..24b42e3ed035e6c3225aca80754949b4194d4652 100644 (file)
@@ -1389,6 +1389,7 @@ create_new_general_access (struct access_site *acc, d_str str)
         for now just reset all debug stmts referencing objects that have
         been peeled.  */
       gimple_debug_bind_reset_value (stmt);
+      update_stmt (stmt);
       break;
 
     default:
index f70b5e6419960b2568b3bedabeb9b56d81c017b7..65c465fa02b4953ebf03f140f04624740a2ec218 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-15  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/43317
+       * gcc.dg/pr43317.c: New testcase.
+
 2010-03-14  Uros Bizjak  <ubizjak@gmail.com>
 
        * g++.dg/abi/packed1.C: Expect warning on the alpha*-*-*.
diff --git a/gcc/testsuite/gcc.dg/pr43317.c b/gcc/testsuite/gcc.dg/pr43317.c
new file mode 100644 (file)
index 0000000..3ee3ed5
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fipa-struct-reorg -fwhole-program -fipa-type-escape -g" } */
+
+extern void *malloc(__SIZE_TYPE__);
+
+struct S {
+  int i;
+};
+
+int main(int argc, char *argv[])
+{
+  int i = argc;
+  struct S *p = malloc(sizeof (struct S));
+  return p[i].i;
+}