diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-09-11 05:44:51 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-09-11 05:44:51 +0000 |
commit | 8f820299e3a349d39429bfe64bcbf22593369bf4 (patch) | |
tree | 140d683aaf2a58cbce1b0d42cae3e952ee21331c /gcc/varasm.c | |
parent | 4337bc937caa26789f01e16d3eaa7ddd72c9558a (diff) | |
download | gcc-8f820299e3a349d39429bfe64bcbf22593369bf4.zip gcc-8f820299e3a349d39429bfe64bcbf22593369bf4.tar.gz gcc-8f820299e3a349d39429bfe64bcbf22593369bf4.tar.bz2 |
varasm.c (make_decl_rtl): Restore leading star on DECL_ASSEMBLER_NAME set for decls with an asmspec.
* varasm.c (make_decl_rtl): Restore leading star on
DECL_ASSEMBLER_NAME set for decls with an asmspec.
* gcc.dg/asm-names.c: New test.
From-SVN: r36309
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 5a10d65..af76b15 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -710,8 +710,14 @@ make_decl_rtl (decl, asmspec, top_level) reg_number = decode_reg_name (asmspec); if (reg_number == -2) - /* ASMSPEC is given, and not the name of a register. */ - new_name = asmspec; + { + /* ASMSPEC is given, and not the name of a register. Mark the + name with a star so assemble_name won't munge it. */ + char *starred = alloca (strlen (asmspec) + 2); + starred[0] = '*'; + strcpy (starred + 1, asmspec); + new_name = starred; + } if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl)) { |