]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/46233 (ICE: verify_flow_info failed: control flow in the...
authorJakub Jelinek <jakub@redhat.com>
Thu, 4 Nov 2010 18:45:06 +0000 (19:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 4 Nov 2010 18:45:06 +0000 (19:45 +0100)
PR tree-optimization/46233
* ipa-pure-const.c (local_pure_const): Do noreturn discovery
after calling analyze_function, not before.

* gcc.dg/pr46233.c: New test.

From-SVN: r166324

gcc/ChangeLog
gcc/ipa-pure-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr46233.c [new file with mode: 0644]

index 7351294329bb4752cd2dd5605a48e6ce8a83e7aa..8c4636838052d8c16d791ac703e17e190dbb8e2f 100644 (file)
@@ -1,5 +1,9 @@
 2010-11-04  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/46233
+       * ipa-pure-const.c (local_pure_const): Do noreturn discovery
+       after calling analyze_function, not before.
+
        PR target/46234
        * config/rs6000/rs6000.c (rs6000_va_start): Use build_simple_mem_ref
        instead of build_va_arg_indirect_ref.
index d671643116ec8b972883658709a0a5f77d8f57c8..c122435391f04300869a50204aff9108491745aa 100644 (file)
@@ -1571,7 +1571,9 @@ local_pure_const (void)
       && skip)
     return 0;
 
-  /* First do NORETURN discovery.  */
+  l = analyze_function (node, false);
+
+  /* Do NORETURN discovery.  */
   if (!skip && !TREE_THIS_VOLATILE (current_function_decl)
       && EDGE_COUNT (EXIT_BLOCK_PTR->preds) == 0)
     {
@@ -1587,7 +1589,6 @@ local_pure_const (void)
 
       changed = true;
     }
-  l = analyze_function (node, false);
 
   switch (l->pure_const_state)
     {
index ddff9cf6ec5ae4da1594dcfffd8bd38f8f51f40d..90c2ed22046caa04f45dcb851163488d6a4f8a9a 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/46233
+       * gcc.dg/pr46233.c: New test.
+
 2010-11-04  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc.dg/property/property-2.m: Deleted.
diff --git a/gcc/testsuite/gcc.dg/pr46233.c b/gcc/testsuite/gcc.dg/pr46233.c
new file mode 100644 (file)
index 0000000..8916e4b
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR tree-optimization/46233 */
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-dce" } */
+
+int
+foo ()
+{
+  int i = 0;
+  while (1)
+    i += foo ();
+}