diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2021-11-06 23:36:08 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2021-11-06 23:36:08 +0100 |
commit | 6078eb7452aa89cb9aeecac30932b58967389459 (patch) | |
tree | 8b5eb1a8f0131a2b7af6ffd5c866bd7009a1b56c /gcc/cgraph.h | |
parent | df2135e88a8f78c853b35246ad426b01b6d08378 (diff) | |
download | gcc-6078eb7452aa89cb9aeecac30932b58967389459.zip gcc-6078eb7452aa89cb9aeecac30932b58967389459.tar.gz gcc-6078eb7452aa89cb9aeecac30932b58967389459.tar.bz2 |
Fix can_be_discarded_p wrt partitioned functions.
gcc/ChangeLog:
* cgraph.h (cgraph_node::can_be_discarded_p): Do not
return true on functions from other partition.
gcc/lto/ChangeLog:
PR ipa/103070
PR ipa/103058
* lto-partition.c (must_not_rename): Update comment.
(promote_symbol): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 4cdb373..0a1f7c8 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -404,7 +404,8 @@ public: inline bool can_be_discarded_p (void) { - return (DECL_EXTERNAL (decl) + return ((DECL_EXTERNAL (decl) + && !in_other_partition) || ((get_comdat_group () || DECL_COMMON (decl) || (DECL_SECTION_NAME (decl) && DECL_WEAK (decl))) |