From: Jan Hubicka Date: Wed, 15 Dec 2010 15:34:36 +0000 (+0100) Subject: tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I and GLOBAL_s... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b121d18c5e535c7b3875ebd48a9ba44c30483823;p=gcc.git tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I and GLOBAL_sub_D. * tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I and GLOBAL_sub_D. From-SVN: r167858 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 435049338f8..f99ec93e9f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-12-14 Jan Hubicka + + * tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I + and GLOBAL_sub_D. + 2010-12-15 Martin Jambor PR tree-optimization/46053 diff --git a/gcc/tree.c b/gcc/tree.c index 5f48ec73002..5ac7fb0b95d 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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)