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.

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))
              {

Reply via email to