From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22BB03856DC2; Thu, 28 Apr 2022 12:52:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22BB03856DC2 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105301] [11/12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 Date: Thu, 28 Apr 2022 12:52:37 +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: 12.0 X-Bugzilla-Keywords: C++-Coroutine, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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, 28 Apr 2022 12:52:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105301 --- Comment #4 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:6cae3bb65c873a2191613f7888fe949553a21f9e commit r12-8309-g6cae3bb65c873a2191613f7888fe949553a21f9e Author: Iain Sandoe Date: Mon Apr 18 09:21:52 2022 +0100 c++, coroutines: Account for overloaded promise return_value() [PR10530= 1]. Whether it was intended or not, it is possible to define a coroutine promise with multiple return_value() methods [which need not even have the same type]. We were not accounting for this possibility in the check to see whether both return_value and return_void are specifier (which is prohibited by the standard). Fixed thus and provided an adjusted diagnostic for the case that multiple return_value() methods are present. Signed-off-by: Iain Sandoe PR c++/105301 gcc/cp/ChangeLog: * coroutines.cc (coro_promise_type_found_p): Account for possib= le mutliple overloads of the promise return_value() method. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr105301.C: New test.=