https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103291
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Perhaps determine_visibility could recurse on DECL_LOCAL_DECL_ALIAS if non-NULL and perhaps DECL_VISIBILITY (decl) != orig_visibility || DECL_VISIBILITY_SPECIFIED (decl) != orig_visibility_specified ? Though, not really sure what should be done if one does e.g.: int non_hidden_fetch(void) { extern const int hidden_global; return hidden_global; } #pragma GCC visibility push(hidden) int hidden_fetch(void) { extern const int hidden_global; return hidden_global; } etc.