diff mbox

Fix PR58492

Message ID alpine.LNX.2.00.1311051525420.4261@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Nov. 5, 2013, 2:27 p.m. UTC
This fixes PR58492 - when late IPA passes are run all IPA transforms
are applied and the last fixup-cfg is run.  This breaks the IL
when for example late local-pure-const makes changes that are not
fixed up for in the callers.

Bootstrap and tests running on x86_64-unknown-linux-gnu.

Richard.

2013-11-05  Richard Biener  <rguenther@suse.de>

	PR ipa/58492
	* passes.def (all_passes): Start with pass_fixup_cfg again.

	* gcc.dg/ipa/pr58492.c: New testcase.
diff mbox

Patch

Index: gcc/passes.def
===================================================================
--- gcc/passes.def	(revision 204390)
+++ gcc/passes.def	(working copy)
@@ -126,6 +126,7 @@  along with GCC; see the file COPYING3.
   /* These passes are run after IPA passes on every function that is being
      output to the assembler file.  */
   INSERT_PASSES_AFTER (all_passes)
+  NEXT_PASS (pass_fixup_cfg);
   NEXT_PASS (pass_lower_eh_dispatch);
   NEXT_PASS (pass_all_optimizations);
   PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations)
Index: gcc/testsuite/gcc.dg/ipa/pr58492.c
===================================================================
--- gcc/testsuite/gcc.dg/ipa/pr58492.c	(revision 0)
+++ gcc/testsuite/gcc.dg/ipa/pr58492.c	(working copy)
@@ -0,0 +1,7 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O3 -fipa-pta" } */
+
+void f(int p, short q)
+{
+  f(0, 0);
+}