This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR58492


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.

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);
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]