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]

Fix ICE when call is optimized out during clone materialization


Hi,
this patch fixes ICE while building Qt 5 with LTO.  When call is optimized out
and removed by cgraph_update_edges_for_call_stmt_node, we must also eliminate
inline clones, or the verifier will complain.

Bootstrapped/regtested x86_64-linux, comitted.

2014-02-18  Jan Hubicka  <hubicka@ucw.cz>

	* cgraph.c (cgraph_update_edges_for_call_stmt_node): Also remove
	inline clones when edge disappears.

Index: cgraph.c
===================================================================
--- cgraph.c	(revision 207870)
+++ cgraph.c	(working copy)
@@ -1529,7 +1529,10 @@ cgraph_update_edges_for_call_stmt_node (
 	     attached to edge is invalid.  */
 	  count = e->count;
 	  frequency = e->frequency;
-	  cgraph_remove_edge (e);
+ 	  if (e->indirect_unknown_callee || e->inline_failed)
+	    cgraph_remove_edge (e);
+	  else
+	    cgraph_remove_node_and_inline_clones (e->callee, NULL);
 	}
       else if (new_call)
 	{


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