From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D51563882645; Thu, 13 Jun 2024 15:06:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D51563882645 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718291193; bh=AkwY2FqxV2snL7fluDMmHGPoiiIsiGqdq9hXqtQckB8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jZ/1D9ndjURjVV1y0SNGmNdRZNf/8XfM8TJI5Qpje7WozsQPVO6YSWcXSffJ3/r2O 797SZngefrCtIOp0ARjygS09tV3G2slUq8cA4lyTopDOr95Jr+rGmkw5J+xPOkpqeW ygUe/NOmFhKpXi37fuF7hWM23x95mmTleL9fdU1M= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115194] [modules] "reference to is ambiguous" when multiple paths to same symbol exist through module Date: Thu, 13 Jun 2024 15:06:33 +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: 15.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D115194 --- Comment #1 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:8878fecc251762bc32c24e659695557797e03fd9 commit r15-1296-g8878fecc251762bc32c24e659695557797e03fd9 Author: Jason Merrill Date: Wed Jun 12 21:44:10 2024 -0400 c++/modules: multiple usings of the same decl [PR115194] add_binding_entity creates an OVERLOAD to represent a using-declaration= in module purview of a declaration in the global module, even for non-functions, and we were failing to merge that with the original declaration in name lookup. It's not clear to me that building the OVERLOAD is what should be happening, but let's work around it for now pending an overhaul of using-decl hand= ling for c++/114683. PR c++/115194 gcc/cp/ChangeLog: * name-lookup.cc (name_lookup::process_module_binding): Strip an OVERLOAD from a non-function. gcc/testsuite/ChangeLog: * g++.dg/modules/using-23_a.C: New test. * g++.dg/modules/using-23_b.C: New test.=