diff options
author | Jan Hubicka <jh@suse.cz> | 2006-07-24 02:16:16 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2006-07-24 00:16:16 +0000 |
commit | 386b46cf78f852e82fb1f37ba271858b1f1040b3 (patch) | |
tree | 20047ee6f873662157a0d8d8f27ffbacb9260691 /gcc/c-decl.c | |
parent | 3201e73d96ae8bd6425828a807987f35f1f7bd32 (diff) | |
download | gcc-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-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 6ad6a69..b900e8a 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) |