OSDN Git Service

* tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Dec 2010 15:34:36 +0000 (15:34 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Dec 2010 15:34:36 +0000 (15:34 +0000)
and GLOBAL_sub_D.

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

gcc/ChangeLog
gcc/tree.c

index 4350493..f99ec93 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-14  Jan Hubicka  <jh@suse.cz>
+
+       * tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I
+       and GLOBAL_sub_D.
+
 2010-12-15  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/46053
index 5f48ec7..5ac7fb0 100644 (file)
@@ -8518,8 +8518,12 @@ get_file_function_name (const char *type)
     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.  */
-  else if ((type[0] == 'I' || type[0] == 'D') && targetm.have_ctors_dtors)
+     debugging purposes. 
+     We also assign sub_I and sub_D sufixes to constructors called from
+     the global static constructors.  These are always local.  */
+  else if (((type[0] == 'I' || type[0] == 'D') && targetm.have_ctors_dtors)
+          || (strncmp (type, "sub_", 4) == 0
+              && (type[4] == 'I' || type[4] == 'D')))
     {
       const char *file = main_input_filename;
       if (! file)