diff mbox

Transparent alias suport part 11 (vtable rewritting fix)

Message ID 20151209194219.GA6333@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Dec. 9, 2015, 7:42 p.m. UTC
Hi,
this patch fixes a thinko in vtable rewritting where instead of checking
references we was checking list of nodes referring to vtable.  The loop
looks for the entries in vtable that can be replaced by local aliases,
so this bug probably disabled most of the transformations.

It reproduced as an ICE while we tried to load body of an transparent alias
during the bootstrap with decl merging disabled.
This is down to one ICE during the build I will fix next.

Bootstrapped/regtested x86_64-linux, commited.

Honza
	PR ipa/61886
	* ipa-visibility.c (function_and_variable_visibility): Fix vtable
	rewritting guard.
diff mbox

Patch

Index: ipa-visibility.c
===================================================================
--- ipa-visibility.c	(revision 231472)
+++ ipa-visibility.c	(working copy)
@@ -720,7 +720,7 @@  function_and_variable_visibility (bool w
 	  bool found = false;
 
 	  /* See if there is something to update.  */
-	  for (i = 0; vnode->iterate_referring (i, ref); i++)
+	  for (i = 0; vnode->iterate_reference (i, ref); i++)
 	    if (ref->use == IPA_REF_ADDR
 		&& can_replace_by_local_alias_in_vtable (ref->referred))
 	      {