summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-24 00:16:16 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-24 00:16:16 +0000
commit05806473a2ed27962584c347e1b87910b3078f29 (patch)
tree20047ee6f873662157a0d8d8f27ffbacb9260691 /gcc/c-decl.c
parenta8916fc15d8375ed837c479c02b0417f553c3065 (diff)
downloadgcc-05806473a2ed27962584c347e1b87910b3078f29.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 6ad6a695d08..b900e8a8d5d 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3554,7 +3554,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
}
/* If this was marked 'used', be sure it will be output. */
- if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
+ if (!flag_unit_at_a_time && lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
mark_decl_referenced (decl);
if (TREE_CODE (decl) == TYPE_DECL)