From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 83B5D39B8C8E; Thu, 11 Feb 2021 16:00:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83B5D39B8C8E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97582] [9/10/11 Regression] ICE tree check: expected function_type or method_type, have error_mark in add_function_candidate, at cp/call.c:2146 since r9-6405-gbddee796d0b4800b Date: Thu, 11 Feb 2021 16:00:36 +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: 9.3.0 X-Bugzilla-Keywords: ice-on-valid-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: P2 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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: Thu, 11 Feb 2021 16:00:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97582 --- Comment #3 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:cb168f779c87c1e0c37d22ea82dfb93ff8c873bc commit r11-7191-gcb168f779c87c1e0c37d22ea82dfb93ff8c873bc Author: Patrick Palka Date: Thu Feb 11 10:59:54 2021 -0500 c++: Fix ICE from op_unqualified_lookup [PR97582] In this testcase, we're crashing because the lookup of operator+ from within the generic lambda via lookup_name finds multiple bindings (C1::operator+ and C2::operator+) and returns a TREE_LIST thereof, something which op_unqualified_lookup (and push_operator_bindings) isn't prepared to handle. This patch extends op_unqualified_lookup and push_operator_bindings to handle such an ambiguous lookup result in the natural way. gcc/cp/ChangeLog: PR c++/97582 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous lookup result by discarding it if the first element is a class-scope declaration, otherwise return it. (push_operator_bindings): Handle an ambiguous lookup result by doing push_local_binding on each element in the list. gcc/testsuite/ChangeLog: PR c++/97582 * g++.dg/cpp0x/lambda/lambda-template17.C: New test.=