From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BA6B385842B; Mon, 28 Mar 2022 13:37:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BA6B385842B From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103291] [11/12 Regression] #pragma gcc visibility is lost for external decls declared inside a function Date: Mon, 28 Mar 2022 13:37:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2022 13:37:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103291 --- Comment #5 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:8796eb27e24bd3340ebd393e96a94b91d09407e9 commit r12-7854-g8796eb27e24bd3340ebd393e96a94b91d09407e9 Author: Jason Merrill 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.cc (push_local_extern_decl_alias): Call determine_visibility. gcc/testsuite/ChangeLog: * g++.dg/ext/visibility/visibility-local-extern1.C: New test.=