https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103291
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:10dcd13ff7a9f0fbbae8749929e8808792c76395 commit r11-9702-g10dcd13ff7a9f0fbbae8749929e8808792c76395 Author: Jason Merrill <ja...@redhat.com> Date: Sun Mar 27 09:44:59 2022 -0400 c++: visibility of local extern [PR103291] When setting up the hidden namespace-scope decl for a local extern, we also need to set its visibility. PR c++/103291 gcc/cp/ChangeLog: * name-lookup.c (push_local_extern_decl_alias): Call determine_visibility. gcc/testsuite/ChangeLog: * g++.dg/ext/visibility/visibility-local-extern1.C: New test.