summaryrefslogtreecommitdiff
path: root/gcc/dwarf2asm.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-05-11 20:14:19 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-05-11 20:14:19 +0200
commit3895ec538abb365483f1ff862f1fe0e78a3119d5 (patch)
treeba115298ec48f9d6e9f497a0767153cc671f31c1 /gcc/dwarf2asm.c
parent056928b248b7e3f879c2b3ac4be935e67ad3a09a (diff)
downloadgcc-3895ec538abb365483f1ff862f1fe0e78a3119d5.tar.gz
re PR c++/44059 (Static initializers executed more than once when using unique global symbols)
PR c++/44059 * config/elfos.h (ASM_DECLARE_OBJECT_NAME): Use qnu_unique_object even for DECL_ONE_ONLY DECL_ARTIFICIAL !TREE_READONLY decls. * config/alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Likewise. * dwarf2asm.c (dw2_output_indirect_constant_1): Set TREE_READONLY on DW.ref.* decls. From-SVN: r159287
Diffstat (limited to 'gcc/dwarf2asm.c')
-rw-r--r--gcc/dwarf2asm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 0770607c615..516a26004f0 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -1,5 +1,5 @@
/* Dwarf2 assembler output helper routines.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
@@ -877,6 +877,7 @@ dw2_output_indirect_constant_1 (splay_tree_node node,
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
DECL_INITIAL (decl) = decl;
+ TREE_READONLY (decl) = 1;
if (TREE_PUBLIC (id))
{