summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-09 12:33:59 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-09 12:33:59 +0000
commit23bf35fe61ebc98ed68245fbb4635b7822d7cf19 (patch)
treed1cba8eb7ec302eeabfa3e5b74c8e7ea48836cc0 /gcc
parenta3007b78df77212e3afcd71e36b0a34b64ddfe58 (diff)
downloadppe42-gcc-23bf35fe61ebc98ed68245fbb4635b7822d7cf19.tar.gz
ppe42-gcc-23bf35fe61ebc98ed68245fbb4635b7822d7cf19.zip
2005-11-09 Andrew Pinski <pinskia@physics.uc.edu>
PR c/24644 * dwarf2-out.c (add_name_and_src_coords_attributes): Don't add a linkage name for a variable if it a register variable. * c-decl.c (grokdeclarator): Global register variables should be set as PUBLIC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-decl.c5
-rw-r--r--gcc/dwarf2out.c3
3 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e763fdf5ef9..48deb177954 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-09 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c/24644
+ * dwarf2-out.c (add_name_and_src_coords_attributes): Don't add
+ a linkage name for a variable if it a register variable.
+ * c-decl.c (grokdeclarator): Global register variables
+ should be set as PUBLIC.
+
2005-11-09 Andreas Krebbel <krebbel1@de.ibm.com>
PR 24624
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index f7cad3b7105..003b813fc7d 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -4694,11 +4694,10 @@ grokdeclarator (const struct c_declarator *declarator,
/* At file scope, the presence of a `static' or `register' storage
class specifier, or the absence of all storage class specifiers
makes this declaration a definition (perhaps tentative). Also,
- the absence of both `static' and `register' makes it public. */
+ the absence of `static' makes it public. */
if (current_scope == file_scope)
{
- TREE_PUBLIC (decl) = !(storage_class == csc_static
- || storage_class == csc_register);
+ TREE_PUBLIC (decl) = storage_class != csc_static;
TREE_STATIC (decl) = !extern_ref;
}
/* Not at file scope, only `static' makes a static definition. */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 4cdb480a6e8..28e0031b7b4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -10809,7 +10809,8 @@ add_name_and_src_coords_attributes (dw_die_ref die, tree decl)
if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL)
&& TREE_PUBLIC (decl)
&& DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)
- && !DECL_ABSTRACT (decl))
+ && !DECL_ABSTRACT (decl)
+ && !(TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl)))
add_AT_string (die, DW_AT_MIPS_linkage_name,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
}
OpenPOWER on IntegriCloud