This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/11498] New: asm can't be used to give a variable its own name
- From: "geoffk at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2003 08:02:08 -0000
- Subject: [Bug middle-end/11498] New: asm can't be used to give a variable its own name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11498
Summary: asm can't be used to give a variable its own name
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: geoffk at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: any
GCC host triplet: any
GCC target triplet: any
This doesn't work:
int foo(void)
{
static int x asm ("x") = 3;
return x++;
}
because of the hacky way that make_decl_rtl tries to determine if
DECL_ASSEMBLER_NAME has already been set. It shouldn't be in that business at
all, that code should be in lhd_set_decl_assembler_name.