===================================================================
@@ -907,6 +907,7 @@
DECL_IGNORED_P (decl) = 1;
DECL_INITIAL (decl) = decl;
TREE_READONLY (decl) = 1;
+ TREE_STATIC (decl) = TREE_STATIC (id);
if (TREE_PUBLIC (id))
{
@@ -915,8 +916,6 @@
if (USE_LINKONCE_INDIRECT)
DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
}
- else
- TREE_STATIC (decl) = 1;
sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym);
assemble_variable (decl, 1, 1, 1);
Please review this at http://codereview.appspot.com/6133061/
Affected files:
M gcc/dwarf2asm.c
2012-04-30 Ahmad Sharif <asharif@google.com>
* gcc/dwarf2asm.c: copy TREE_STATIC() property from id.
===================================================================
@@ -907,6 +907,7 @@
DECL_IGNORED_P (decl) = 1;
DECL_INITIAL (decl) = decl;
TREE_READONLY (decl) = 1;
+ TREE_STATIC (decl) = TREE_STATIC (id);
if (TREE_PUBLIC (id))
{
@@ -915,8 +916,6 @@
if (USE_LINKONCE_INDIRECT)
DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
}
- else
- TREE_STATIC (decl) = 1;
sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym);
assemble_variable (decl, 1, 1, 1);