]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/44964 (ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539...
authorRichard Guenther <rguenther@suse.de>
Wed, 10 Nov 2010 16:05:03 +0000 (16:05 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 10 Nov 2010 16:05:03 +0000 (16:05 +0000)
2010-11-10  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/44964
* ipa-inline.c (cgraph_flatten): Check that SSA form matches.

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

From-SVN: r166543

gcc/ChangeLog
gcc/ipa-inline.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr44964.c [new file with mode: 0644]

index a13d96b848da7a25e975e4cf2e2a93647e6c9dff..e0f89586ba90dd7bb24c4a46645208fa5cd0ade9 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-10  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/44964
+       * ipa-inline.c (cgraph_flatten): Check that SSA form matches.
+
 2010-11-10  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/46351
index 0072d61bfc36d2c84a20f0d7b560144b42af33d0..61fc6b9992ec830b07130dce07bfc9802e91428a 100644 (file)
@@ -1407,6 +1407,14 @@ cgraph_flatten (struct cgraph_node *node)
          continue;
        }
 
+      if (gimple_in_ssa_p (DECL_STRUCT_FUNCTION (node->decl))
+         != gimple_in_ssa_p (DECL_STRUCT_FUNCTION (e->callee->decl)))
+       {
+         if (dump_file)
+           fprintf (dump_file, "Not inlining: SSA form does not match.\n");
+         continue;
+       }
+
       /* Inline the edge and flatten the inline clone.  Avoid
          recursing through the original node if the node was cloned.  */
       if (dump_file)
index 31d31d94067de8f82107d008285b978692559bbf..92a850909a596cf38790d26736e31d0d7482f5d6 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-10  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/44964
+       * gcc.dg/pr44964.c: New testcase.
+
 2010-11-10  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnat.dg/opt10.adb: Fix typo.
diff --git a/gcc/testsuite/gcc.dg/pr44964.c b/gcc/testsuite/gcc.dg/pr44964.c
new file mode 100644 (file)
index 0000000..1df1bde
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fkeep-inline-functions -O" } */
+
+static inline __attribute__ ((const))
+void baz (int i)
+{
+}
+
+static __attribute__ ((always_inline))
+inline __attribute__ ((flatten))
+void bar (void)
+{
+  baz (0);
+}
+
+void
+foo (void)
+{
+  bar ();
+}
+
This page took 0.132005 seconds and 5 git commands to generate.