OSDN Git Service

PR c++/44059
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 May 2010 18:14:19 +0000 (18:14 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:05:19 +0000 (14:05 +0900)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159287 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/alpha/elf.h

index 712b437..16f56b8 100644 (file)
@@ -1,5 +1,12 @@
 2010-05-11  Jakub Jelinek  <jakub@redhat.com>
 
+       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.
+
        PR c++/44062
        * c-parser.c (c_parser_expression): Mark LHS of a comma
        expression as read if it is a decl, handled component or
index d2bf732..57ab91e 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
    Contributed by Richard Henderson (rth@tamu.edu).
 
 This file is part of GCC.
@@ -284,10 +284,12 @@ do {                                                                      \
     HOST_WIDE_INT size;                                                        \
                                                                        \
     /* For template static data member instantiations or               \
-       inline fn local statics, use gnu_unique_object so that          \
-       they will be combined even under RTLD_LOCAL.  */                        \
-    if (USE_GNU_UNIQUE_OBJECT                                          \
-       && !DECL_ARTIFICIAL (DECL) && DECL_ONE_ONLY (DECL))             \
+       inline fn local statics and their guard variables, use          \
+       gnu_unique_object so that they will be combined even under      \
+       RTLD_LOCAL.  Don't use gnu_unique_object for typeinfo,          \
+       vtables and other read-only artificial decls.  */               \
+    if (USE_GNU_UNIQUE_OBJECT  && DECL_ONE_ONLY (DECL)                 \
+       && (!DECL_ARTIFICIAL (DECL) || !TREE_READONLY (DECL)))          \
       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "gnu_unique_object");     \
     else                                                               \
       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");                        \