From 715a4e08d04dbefdf690ee11bb07521ad8a6b6ea Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 20 Feb 2010 10:08:20 +1030 Subject: re PR middle-end/42344 (ICE in rs6000.md with ipa-sra for 252.eon) PR middle-end/42344 * cgraph.h (cgraph_make_decl_local): Declare. * cgraph.c (cgraph_make_decl_local): New function. (cgraph_make_node_local): Use it. * cgraphunit.c (cgraph_function_versioning): Likewise. * ipa.c (function_and_variable_visibility): Likewise. From-SVN: r156914 --- gcc/ipa.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gcc/ipa.c') diff --git a/gcc/ipa.c b/gcc/ipa.c index 1230448..63de1d9 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -400,9 +400,7 @@ function_and_variable_visibility (bool whole_program) && !DECL_EXTERNAL (node->decl)) { gcc_assert (whole_program || !TREE_PUBLIC (node->decl)); - TREE_PUBLIC (node->decl) = 0; - DECL_COMDAT (node->decl) = 0; - DECL_WEAK (node->decl) = 0; + cgraph_make_decl_local (node->decl); } node->local.local = (cgraph_only_called_directly_p (node) && node->analyzed @@ -431,8 +429,7 @@ function_and_variable_visibility (bool whole_program) if (!vnode->externally_visible) { gcc_assert (whole_program || !TREE_PUBLIC (vnode->decl)); - TREE_PUBLIC (vnode->decl) = 0; - DECL_COMMON (vnode->decl) = 0; + cgraph_make_decl_local (vnode->decl); } gcc_assert (TREE_STATIC (vnode->decl)); } -- cgit v1.1