re PR middle-end/37858 (ICE when "-fdump-ipa-all -dv" is used)
authorJakub Jelinek <jakub@redhat.com>
Mon, 3 Nov 2008 08:42:10 +0000 (09:42 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 3 Nov 2008 08:42:10 +0000 (09:42 +0100)
PR middle-end/37858
* passes.c (execute_one_pass): Don't look at cfun->curr_properties
for ipa and simple ipa passes.

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

From-SVN: r141545

gcc/ChangeLog
gcc/passes.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr37858.c [new file with mode: 0644]

index 90c40ca..6489e91 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/37858
+       * passes.c (execute_one_pass): Don't look at cfun->curr_properties
+       for ipa and simple ipa passes.
+
 2008-11-02  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/37542
index 69d484b..1332e0b 100644 (file)
@@ -1289,6 +1289,7 @@ execute_one_pass (struct opt_pass *pass)
   if (initializing_dump
       && dump_file
       && graph_dump_format != no_graph
+      && cfun
       && (cfun->curr_properties & (PROP_cfg | PROP_rtl))
          == (PROP_cfg | PROP_rtl))
     {
index f568e4e..1d7e58b 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/37858
+       * gcc.dg/pr37858.c: New test.
+
 2008-11-03  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/37821
diff --git a/gcc/testsuite/gcc.dg/pr37858.c b/gcc/testsuite/gcc.dg/pr37858.c
new file mode 100644 (file)
index 0000000..4a827ee
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR middle-end/37858 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-early_local_cleanups -dv" } */
+
+int
+main (void)
+{
+  return 0;
+}
+
+/* { dg-final { cleanup-ipa-dump "early_local_cleanups" } } */