gcc/gcc43-pr37858.patch
Jakub Jelinek d69d1f8218 4.3.2-7
2008-11-05 10:15:48 +00:00

33 lines
868 B
Diff

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.
* gcc.dg/pr37858.c: New test.
--- gcc/passes.c (revision 141544)
+++ gcc/passes.c (revision 141545)
@@ -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))
{
--- gcc/testsuite/gcc.dg/pr37858.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr37858.c (revision 141545)
@@ -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" } } */