From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB9FD387084E; Wed, 10 Mar 2021 15:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB9FD387084E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99508] [11 Regression] Asm labels declared inside a function are ignored Date: Wed, 10 Mar 2021 15:51:07 +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.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: nathan at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Wed, 10 Mar 2021 15:51:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99508 --- Comment #4 from CVS Commits --- The master branch has been updated by Nathan Sidwell : https://gcc.gnu.org/g:b97af562b574697a4fff7fb8c69f579c01e70dec commit r11-7605-gb97af562b574697a4fff7fb8c69f579c01e70dec Author: Nathan Sidwell Date: Wed Mar 10 07:39:51 2021 -0800 c++: Propagate assembler name from local-externs [PR 99508] This is another place where our one-true-decl representation breaks down. The fix here propagates the assembly name to the ns-scope alias. that fixes the reported problem but changes the behaviour when the user has explicitly declared the entity in its namespace. However, we didn't handle that case 'correctly' anyway before. Previously we'd also ignore the explicitly specified assembler name, now we propagate it. It's not clear to me what the desired semantics would be in decorating just one of the local extern declarations this way. I don't think we can really do better without propagating this aliasing property into the middle end (which is also needed for some constexpr handling, see PR97306). I tried that before and it turned into a rat-hole. PR c++/99508 gcc/cp/ * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's assembler name to the ns alias. gcc/testsuite/ * g++.dg/ext/pr99508.C: New.=