From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF22E3858281; Mon, 8 Jan 2024 14:29:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF22E3858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704724161; bh=S0GLxVgWF1FkCAhBMlepDt6MsXZ3LuXJu1A0sgmCmYo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jEQwvJni1yWKErsqoYykRSHFvCpv5DmDDJX6IVYUe9shKXkcEEVT+GtRyNa8koTqU 5an2XXJ8D/HGLCu+l9ce0Ln02LDKub6Nqujj5C6Hl1BBhgFSxbHkS5/1gtXJyAPt7r c8Im2wV8H8kBZsOpzp79c+TmFyVDEi8GRb5CFbKM= From: "jakub 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: Mon, 08 Jan 2024 14:29:19 +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: jakub 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- (In reply to John David Anglin from comment #5) > The problem is TREE_SYMBOL_REFERENCED is not set for libfuncs. This fixes > problem on hppa64-hpux: >=20 > bash-5.1$ git diff gcc/varasm.cc > diff --git a/gcc/varasm.cc b/gcc/varasm.cc > index 69f8f8ee018..0a1cc022023 100644 > --- a/gcc/varasm.cc > +++ b/gcc/varasm.cc > @@ -2527,9 +2527,7 @@ process_pending_assemble_externals (void) > for (rtx list =3D pending_libcall_symbols; list; list =3D XEXP (list, = 1)) > { > rtx symbol =3D XEXP (list, 0); > - tree id =3D get_identifier (XSTR (symbol, 0)); > - if (TREE_SYMBOL_REFERENCED (id)) > - targetm.asm_out.external_libcall (symbol); > + targetm.asm_out.external_libcall (symbol); > } >=20 > pending_assemble_externals =3D 0; >=20 > If you don't care about libfuncs, you could move the TREE_SYMBOL_REFERENC= ED > check into the bpf target. Then the bug is that it isn't set when they are actually referenced. The whole point of the patch was avoid referencing something that isn't rea= lly referenced. And it wasn't specific to one backend, many backends simply us= ed to emit say externs for both signed and unsigned division when expansion saw range of operands would allow both signed and unsigned division and so expa= nded both to pick the cheaper one.=