]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR target/35485
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Oct 2008 17:33:53 +0000 (17:33 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Oct 2008 17:33:53 +0000 (17:33 +0000)
        * tree.c (get_file_function_name): Copy first_global_object_name.
        Centralize call to clean_symbol_name.

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

gcc/ChangeLog
gcc/tree.c

index 83cffdea1b9f05b919222c8a338b5ae97e2f5c4c..455fcd947433ca4804a968daebd20c8055a36086 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-21  David Edelsohn  <edelsohn@gnu.org>
+
+       PR target/35485
+       * tree.c (get_file_function_name): Copy first_global_object_name.
+       Centralize call to clean_symbol_name.
+
 2008-10-21  Sandra Loosemore  <sandra@codesourcery.com>
 
        * config.gcc (powerpc-*): Make t-ppcgas imply usegas.h.
index 7064e06bcece9ceb974de38a9b8f3892a82435a8..925eafe0506189bcc305ded2f4971cca826f54dd 100644 (file)
@@ -6923,7 +6923,7 @@ get_file_function_name (const char *type)
 
   /* If we already have a name we know to be unique, just use that.  */
   if (first_global_object_name)
-    p = first_global_object_name;
+    p = q = ASTRDUP (first_global_object_name);
   /* If the target is handling the constructors/destructors, they
      will be local to this file and the name is only necessary for
      debugging purposes.  */
@@ -6940,7 +6940,6 @@ get_file_function_name (const char *type)
       else
        p = file;
       p = q = ASTRDUP (p);
-      clean_symbol_name (q);
     }
   else
     {
@@ -6959,7 +6958,6 @@ get_file_function_name (const char *type)
       len = strlen (file);
       q = (char *) alloca (9 * 2 + len + 1);
       memcpy (q, file, len + 1);
-      clean_symbol_name (q);
 
       sprintf (q + len, "_%08X_%08X", crc32_string (0, name),
               crc32_string (0, get_random_seed (false)));
@@ -6967,6 +6965,7 @@ get_file_function_name (const char *type)
       p = q;
     }
 
+  clean_symbol_name (q);
   buf = (char *) alloca (sizeof (FILE_FUNCTION_FORMAT) + strlen (p)
                         + strlen (type));