diff options
author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-09 23:57:41 +0000 |
---|---|---|
committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-09 23:57:41 +0000 |
commit | 215ba52ac274419fcb903e922a6de9b851b03c3f (patch) | |
tree | 78c9d9a49b46d8a9f3fe052907848735b90187cf /gcc | |
parent | 5ecbe501bce3cad5d5772f6fe8485c00cd69f774 (diff) | |
download | gcc-215ba52ac274419fcb903e922a6de9b851b03c3f.tar.gz |
PR other/37265
* dwarf2asm.c (dw2_force_const_mem): Use unstripped symbol name for
splay tree lookup.
(dw2_output_indirect_constant_1): Use unstripped name in symbol
reference.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/dwarf2asm.c | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc784a6e515..7178941e146 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-09-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR other/37265 + * dwarf2asm.c (dw2_force_const_mem): Use unstripped symbol name for + splay tree lookup. + (dw2_output_indirect_constant_1): Use unstripped name in symbol + reference. + 2008-09-09 Sandra Loosemore <sandra@codesourcery.com> * doc/invoke.texi (ARM Options): Correct errors in discussion diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index 9ae94200f18..e490b34a10a 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -807,7 +807,7 @@ rtx dw2_force_const_mem (rtx x, bool is_public) { splay_tree_node node; - const char *str; + const char *key; tree decl; if (! indirect_pool) @@ -817,13 +817,14 @@ dw2_force_const_mem (rtx x, bool is_public) gcc_assert (GET_CODE (x) == SYMBOL_REF); - str = targetm.strip_name_encoding (XSTR (x, 0)); - node = splay_tree_lookup (indirect_pool, (splay_tree_key) str); + key = XSTR (x, 0); + node = splay_tree_lookup (indirect_pool, (splay_tree_key) key); if (node) decl = (tree) node->value; else { tree id; + const char *str = targetm.strip_name_encoding (key); if (is_public && USE_LINKONCE_INDIRECT) { @@ -856,7 +857,7 @@ dw2_force_const_mem (rtx x, bool is_public) if (id) TREE_SYMBOL_REFERENCED (id) = 1; - splay_tree_insert (indirect_pool, (splay_tree_key) str, + splay_tree_insert (indirect_pool, (splay_tree_key) key, (splay_tree_value) decl); } @@ -877,6 +878,7 @@ dw2_output_indirect_constant_1 (splay_tree_node node, sym = (const char *) node->key; decl = (tree) node->value; sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym); + sym = targetm.strip_name_encoding (sym); if (TREE_PUBLIC (decl) && USE_LINKONCE_INDIRECT) fprintf (asm_out_file, "\t.hidden %sDW.ref.%s\n", user_label_prefix, sym); assemble_variable (decl, 1, 1, 1); |