aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 923399d71a4..ff912b7fa57 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -986,9 +986,9 @@ decode_reg_name (const char *name)
bool
bss_initializer_p (const_tree decl)
{
- /* Do not put constants into the .bss section, they belong in a readonly
- section. */
- return (!TREE_READONLY (decl)
+ /* Do not put non-common constants into the .bss section, they belong in
+ a readonly section. */
+ return ((!TREE_READONLY (decl) || DECL_COMMON (decl))
&& (DECL_INITIAL (decl) == NULL
/* In LTO we have no errors in program; error_mark_node is used
to mark offlined constructors. */