aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-07-04 23:01:31 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-07-04 23:01:31 -0400
commit99d3d26e534e11e036364f22ba5614370a4c5f77 (patch)
tree3bfc0fc6ee3a052b79a342d88fc84b2882eb4d28
parent648fb7cf8acd1a11c23cebf066f6ff3305b93115 (diff)
downloadgcc-99d3d26e534e11e036364f22ba5614370a4c5f77.zip
gcc-99d3d26e534e11e036364f22ba5614370a4c5f77.tar.gz
gcc-99d3d26e534e11e036364f22ba5614370a4c5f77.tar.bz2
(RS6000_OUTPUT_BASENAME): Always call assembler_name and pass the
actual symbol name. From-SVN: r7652
-rw-r--r--gcc/config/rs6000/rs6000.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 5b15aa9..ad550a7 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1818,13 +1818,16 @@ toc_section () \
/* This outputs NAME to FILE up to the first null or '['. */
#define RS6000_OUTPUT_BASENAME(FILE, NAME) \
- if ((NAME)[0] == '*') \
+ if ((NAME)[0] == '*' || (NAME)[strlen (NAME) - 1] != ']') \
assemble_name (FILE, NAME); \
else \
{ \
- char *_p; \
- for (_p = (NAME); *_p && *_p != '['; _p++) \
- fputc (*_p, FILE); \
+ int _len = strlen (NAME); \
+ char *_p = alloca (_len + 1); \
+ \
+ strcpy (_p, NAME); \
+ _p[_len - 4] = '\0'; \
+ assemble_name (FILE, _p); \
}
/* Output something to declare an external symbol to the assembler. Most