aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-07-24 02:16:16 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2006-07-24 00:16:16 +0000
commit386b46cf78f852e82fb1f37ba271858b1f1040b3 (patch)
tree20047ee6f873662157a0d8d8f27ffbacb9260691 /gcc/c-common.c
parent3201e73d96ae8bd6425828a807987f35f1f7bd32 (diff)
downloadgcc-386b46cf78f852e82fb1f37ba271858b1f1040b3.zip
gcc-386b46cf78f852e82fb1f37ba271858b1f1040b3.tar.gz
gcc-386b46cf78f852e82fb1f37ba271858b1f1040b3.tar.bz2
re PR c/25795 (Proccessing the attribute externally_visible too early)
PR c/25795 PR c++/27369 * cgraph.c (cgraph_varpool_nodes): Export. (decide_is_variable_needed): Ignored "used" attribute in unit-at-a-time mode. * cgraph.h (cgraph_varpool_nodes): Declare. * cgraphunit.c (decide_is_function_needed): Ignored "used" attribute in unit-at-a-time mode. * gcc.dg/pr25795.c: New test. * gcc.dg/pr25795-1.c: New test. From-SVN: r115693
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 9c26061..71f8ce6 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4308,20 +4308,9 @@ handle_externally_visible_attribute (tree *pnode, tree name,
"%qE attribute have effect only on public objects", name);
*no_add_attrs = true;
}
- else if (TREE_CODE (node) == FUNCTION_DECL)
- {
- struct cgraph_node *n = cgraph_node (node);
- n->local.externally_visible = true;
- if (n->local.finalized)
- cgraph_mark_needed_node (n);
- }
- else if (TREE_CODE (node) == VAR_DECL)
- {
- struct cgraph_varpool_node *n = cgraph_varpool_node (node);
- n->externally_visible = true;
- if (n->finalized)
- cgraph_varpool_mark_needed_node (n);
- }
+ else if (TREE_CODE (node) == FUNCTION_DECL
+ || TREE_CODE (node) == VAR_DECL)
+ ;
else
{
warning (OPT_Wattributes, "%qE attribute ignored", name);