(RS6000_OUTPUT_BASENAME): Always call assembler_name and pass the
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jul 1994 03:01:31 +0000 (03:01 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jul 1994 03:01:31 +0000 (03:01 +0000)
actual symbol name.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7652 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/rs6000/rs6000.h

index 5b15aa9..ad550a7 100644 (file)
@@ -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