diff options
author | Jan Hubicka <jh@suse.cz> | 2009-11-13 19:55:07 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-11-13 18:55:07 +0000 |
commit | 589520b621afc3583a6bea2aeadae3825c82211e (patch) | |
tree | dcd86629c1ccc4e4d990f1f96a5d56b4fa507e3e /gcc | |
parent | 5b6dad5d8fbc79a1029f55e565336df4b74ed3c6 (diff) | |
download | gcc-589520b621afc3583a6bea2aeadae3825c82211e.zip gcc-589520b621afc3583a6bea2aeadae3825c82211e.tar.gz gcc-589520b621afc3583a6bea2aeadae3825c82211e.tar.bz2 |
ipa.c (function_and_variable_visibility): Clear COMDAT on functions when to PUBLIC is set.
* ipa.c (function_and_variable_visibility): Clear COMDAT on functions
when to PUBLIC is set.
From-SVN: r154167
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5dec6f..f2a0da5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-11-13 Jan Hubicka <jh@suse.cz> + + * ipa.c (function_and_variable_visibility): Clear COMDAT on functions + when to PUBLIC is set. + 2009-11-13 Jakub Jelinek <jakub@redhat.com> PR middle-end/42029 @@ -292,6 +292,12 @@ function_and_variable_visibility (bool whole_program) for (node = cgraph_nodes; node; node = node->next) { + /* C++ FE on lack of COMDAT support create local COMDAT functions + (that ought to be shared but can not due to object format + limitations). It is neccesary to keep the flag to make rest of C++ FE + happy. Clear the flag here to avoid confusion in middle-end. */ + if (DECL_COMDAT (node->decl) && !TREE_PUBLIC (node->decl)) + DECL_COMDAT (node->decl) = 0; gcc_assert ((!DECL_WEAK (node->decl) && !DECL_COMDAT (node->decl)) || TREE_PUBLIC (node->decl) || DECL_EXTERNAL (node->decl)); if (cgraph_externally_visible_p (node, whole_program)) |