re PR ipa/70795 (gcc/libjava/interpret.cc:1948:1: ICE: in binds_to_current_def_p...
authorJan Hubicka <hubicka@ucw.cz>
Thu, 9 Feb 2017 18:16:00 +0000 (19:16 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 9 Feb 2017 18:16:00 +0000 (18:16 +0000)
PR ipa/70795
* cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
flag if needed.

From-SVN: r245312

gcc/ChangeLog
gcc/cgraphunit.c

index 9af921975a3021b130c8fc2139a7b174be73d52e..4826bcba838b89fc1d43852aeabb98d702714ca0 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/70795
+       * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
+       flag if needed.
+
 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
 
        * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
index cc49c798515001cb792a07d7b7fe58df062543ca..c82a88a599ca61b068dd9783d2a6158163809b37 100644 (file)
@@ -541,6 +541,8 @@ cgraph_node::add_new_function (tree fndecl, bool lowered)
        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));