re PR middle-end/20263 (Incorrect asm for global register vars)

PR middle-end/20263
	* varasm.c (make_decl_rtl) [ASM_DECLARE_REGISTER_GLOBAL]: Use
	the DECL_NAME, not the DECL_ASSEMBLER_NAME.

From-SVN: r97157
This commit is contained in:
Eric Botcazou 2005-03-29 14:08:54 +02:00 committed by Eric Botcazou
parent 1f1e85278a
commit 360ca05451
4 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-03-29 Eric Botcazou <ebotcazou@libertysurf.fr>
PR middle-end/20263
* varasm.c (make_decl_rtl) [ASM_DECLARE_REGISTER_GLOBAL]: Use
the DECL_NAME, not the DECL_ASSEMBLER_NAME.
2005-03-29 Dale Johannesen <dalej@apple.com>
* Makefile.in (value-prof.o): New dependencies on $(DIAGNOSTIC_H)

View File

@ -1,3 +1,7 @@
2005-03-29 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/sparc-reg-1.c: New test.
2005-03-28 Steve Ellcey <sje@cup.hp.com>
PR target/19890

View File

@ -0,0 +1,11 @@
/* PR middle-end/20263 */
/* { dg-do assemble { target sparc64-*-* } } */
/* { dg-options "" } */
register void *tp __asm__("%g7");
void set_tp(void)
{
tp = 0;
}

View File

@ -897,7 +897,6 @@ make_decl_rtl (tree decl)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
{
reg_number = decode_reg_name (name);
@ -940,6 +939,7 @@ make_decl_rtl (tree decl)
/* Make this register global, so not usable for anything
else. */
#ifdef ASM_DECLARE_REGISTER_GLOBAL
name = IDENTIFIER_POINTER (DECL_NAME (decl));
ASM_DECLARE_REGISTER_GLOBAL (asm_out_file, decl, reg_number, name);
#endif
nregs = hard_regno_nregs[reg_number][DECL_MODE (decl)];