https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70795

--- Comment #11 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I would aprechiate if someone could bootstrap&regtest this
Index: cgraphunit.c
===================================================================
--- cgraphunit.c        (revision 245196)
+++ cgraphunit.c        (working copy)
@@ -541,6 +541,8 @@ cgraph_node::add_new_function (tree fnde
        node->local.local = false;
        node->definition = true;
        node->force_output = true;
+       if (TREE_PUBLIC (fndecl))
+         node->externally_visible = true;
        if (!lowered && symtab->state == EXPANSION)
          {
            push_cfun (DECL_STRUCT_FUNCTION (fndecl));

The bug is that we don't set TREE_PUBLIC for ctor function on collect2 path.
This bug probably existed forever but triggered the test in decl_bind_local_p.

Honza

Reply via email to