diff mbox

Fix PR60973

Message ID alpine.LSU.2.11.1405131254320.18709@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener May 13, 2014, 10:55 a.m. UTC
As discussed in the PR, tailcall settings have to be cleared by
the inliner.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk
and 4.9 branch.

Richard.

2014-05-13  Richard Biener  <rguenther@suse.de>

	PR ipa/60973
	* tree-inline.c (remap_gimple_stmt): Clear tail call flag,
	it needs revisiting whether the call still may be tail-called.
diff mbox

Patch

Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c	(revision 210263)
+++ gcc/tree-inline.c	(working copy)
@@ -1483,6 +1487,11 @@  remap_gimple_stmt (gimple stmt, copy_bod
       /* Create a new deep copy of the statement.  */
       copy = gimple_copy (stmt);
 
+      /* Clear flags that need revisiting.  */
+      if (is_gimple_call (copy)
+	  && gimple_call_tail_p (copy))
+	gimple_call_set_tail (copy, false);
+
       /* Remap the region numbers for __builtin_eh_{pointer,filter},
 	 RESX and EH_DISPATCH.  */
       if (id->eh_map)