Commit a2649528 by John David Anglin Committed by John David Anglin

re PR other/37265 (mt_allocator.cc:646: ICE: in gt_ggc_m_S, at ggc-page.c:1281)

	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.

From-SVN: r140183
parent 05665c06
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> 2008-09-09 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi (ARM Options): Correct errors in discussion * doc/invoke.texi (ARM Options): Correct errors in discussion
......
...@@ -807,7 +807,7 @@ rtx ...@@ -807,7 +807,7 @@ rtx
dw2_force_const_mem (rtx x, bool is_public) dw2_force_const_mem (rtx x, bool is_public)
{ {
splay_tree_node node; splay_tree_node node;
const char *str; const char *key;
tree decl; tree decl;
if (! indirect_pool) if (! indirect_pool)
...@@ -817,13 +817,14 @@ dw2_force_const_mem (rtx x, bool is_public) ...@@ -817,13 +817,14 @@ dw2_force_const_mem (rtx x, bool is_public)
gcc_assert (GET_CODE (x) == SYMBOL_REF); gcc_assert (GET_CODE (x) == SYMBOL_REF);
str = targetm.strip_name_encoding (XSTR (x, 0)); key = XSTR (x, 0);
node = splay_tree_lookup (indirect_pool, (splay_tree_key) str); node = splay_tree_lookup (indirect_pool, (splay_tree_key) key);
if (node) if (node)
decl = (tree) node->value; decl = (tree) node->value;
else else
{ {
tree id; tree id;
const char *str = targetm.strip_name_encoding (key);
if (is_public && USE_LINKONCE_INDIRECT) if (is_public && USE_LINKONCE_INDIRECT)
{ {
...@@ -856,7 +857,7 @@ dw2_force_const_mem (rtx x, bool is_public) ...@@ -856,7 +857,7 @@ dw2_force_const_mem (rtx x, bool is_public)
if (id) if (id)
TREE_SYMBOL_REFERENCED (id) = 1; 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); (splay_tree_value) decl);
} }
...@@ -877,6 +878,7 @@ dw2_output_indirect_constant_1 (splay_tree_node node, ...@@ -877,6 +878,7 @@ dw2_output_indirect_constant_1 (splay_tree_node node,
sym = (const char *) node->key; sym = (const char *) node->key;
decl = (tree) node->value; decl = (tree) node->value;
sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym); sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym);
sym = targetm.strip_name_encoding (sym);
if (TREE_PUBLIC (decl) && USE_LINKONCE_INDIRECT) if (TREE_PUBLIC (decl) && USE_LINKONCE_INDIRECT)
fprintf (asm_out_file, "\t.hidden %sDW.ref.%s\n", user_label_prefix, sym); fprintf (asm_out_file, "\t.hidden %sDW.ref.%s\n", user_label_prefix, sym);
assemble_variable (decl, 1, 1, 1); assemble_variable (decl, 1, 1, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment