diff options
author | Jan Hubicka <jh@suse.cz> | 2010-12-15 16:34:36 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-12-15 15:34:36 +0000 |
commit | b121d18c5e535c7b3875ebd48a9ba44c30483823 (patch) | |
tree | 5b4ba1fc4dde819bc3356b83ae7ba6633c6fa795 /gcc/tree.c | |
parent | 740a2a023702baf4883d02c50ff38b8c1b8b400f (diff) | |
download | gcc-b121d18c5e535c7b3875ebd48a9ba44c30483823.zip gcc-b121d18c5e535c7b3875ebd48a9ba44c30483823.tar.gz gcc-b121d18c5e535c7b3875ebd48a9ba44c30483823.tar.bz2 |
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) |