https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85656
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> --- Ok and can you please analyze why this return true: 1139 /* Creating a symtab alias is the optimal way to merge. 1140 It however can not be used in the following cases: 1141 1142 1) if ORIGINAL and ALIAS may be possibly compared for address equality. 1143 2) if ORIGINAL is in a section that may be discarded by linker or if 1144 it is an external functions where we can not create an alias 1145 (ORIGINAL_DISCARDABLE) 1146 3) if target do not support symbol aliases. 1147 4) original and alias lie in different comdat groups. 1148 1149 If we can not produce alias, we will turn ALIAS into WRAPPER of ORIGINAL 1150 and/or redirect all callers from ALIAS to ORIGINAL. */ 1151 if ((original_address_matters && alias_address_matters) 1152 || (original_discardable 1153 && (!DECL_COMDAT_GROUP (alias->decl) 1154 || (DECL_COMDAT_GROUP (alias->decl) 1155 != DECL_COMDAT_GROUP (original->decl)))) 1156 || original_discarded 1157 || !sem_item::target_supports_symbol_aliases_p () 1158 || DECL_COMDAT_GROUP (alias->decl) != DECL_COMDAT_GROUP (original->decl)) 1159 { Thanks.