From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A0653858C62; Fri, 12 Jan 2024 12:59:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A0653858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705064348; bh=pgrWI3nl9VrlmKhXMxfJSISCoPhsNFDvWNNX0laJrvo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RZ/Kd3OKuFy/R+WuWRF8jBH3bOTYumbXfMZDyq8efDwG0Pgxnil8ScK4u/pqCuIeV YhaBI3TnmQXvJw8c1NzVx9GxyPwmGh+rFIq55hYCu0Ye4ju+ktL6+kAUtVe4dl5x0B YWM/eNlJyoD6S9LIa7rhZFRLOq8uyGF4Q1j18Uo0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113182] [14 Regression] FAIL: g++.dg/cpp0x/udlit-namespace.C -std=c++14 execution test Date: Fri, 12 Jan 2024 12:59:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113182 --- Comment #21 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c05beab4ae240a593299c08ef8c775d91187a141 commit r14-7188-gc05beab4ae240a593299c08ef8c775d91187a141 Author: Jakub Jelinek Date: Fri Jan 12 13:58:07 2024 +0100 varasm: Fix up process_pending_assemble_externals [PR113182] John reported that on HP-UX we no longer emit needed external libcalls. The problem is that we didn't strip name encoding when looking up the identifiers in assemble_external_libcall and process_pending_assemble_externals, while assemble_name_resolve does that: const char *real_name =3D targetm.strip_name_encoding (name); tree id =3D maybe_get_identifier (real_name); if (id) { ... mark_referenced (id); The intention is that assemble_external_libcall ensures the IDENTIFIER exists for the external libcall, then for actually emitted calls assemble_name_resolve sees those IDENTIFIERS and sets TREE_SYMBOL_REFERENCED on them and finally process_pending_assemble_externals looks the IDENTIFIER up again and checks its TREE_SYMBOL_REFERENCED. But without the strip_name_encoding call, they can look up different identifiers and those are likely never used. In the PR, John was discussing whether get_identifier or maybe_get_identifier should be used, I believe in assemble_external_lib= call we definitely want to use get_identifier, we need an IDENTIFIER allocat= ed so that it can be actually tracked, in process_pending_assemble_externa= ls it doesn't matter, the IDENTIFIER should be already created. 2024-01-12 John David Anglin Jakub Jelinek PR middle-end/113182 * varasm.cc (process_pending_assemble_externals, assemble_external_libcall): Use targetm.strip_name_encoding before calling get_identifier.=