From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 337B23858405; Sun, 3 Oct 2021 19:50:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 337B23858405 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100673] [coroutines] Non-template, UDT await_suspend return-type results in ICE. Date: Sun, 03 Oct 2021 19:50:50 +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: ice-on-invalid-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: P3 X-Bugzilla-Assigned-To: iains 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 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: Sun, 03 Oct 2021 19:50:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100673 --- Comment #3 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:8009c79b64b532d8a0966fe3c6d636369df6e35d commit r12-4101-g8009c79b64b532d8a0966fe3c6d636369df6e35d Author: John Eivind Helset Date: Sat May 22 01:53:22 2021 +0200 coroutines: Fix ICE with an invalid await_suspend type [PR100673]. The reported ICE occurs when an invalid (non-template) type is found as the return for an await_suspend. Fixed by amending build_co_await to ensure that await_suspend return- type is a template-instantiation before checking to see if it is a valid coroutine handle type. Signed-off-by: John Eivind Helset Signed-off-by: Iain Sandoe PR c++/100673 gcc/cp/ChangeLog: * coroutines.cc (build_co_await): Guard against NULL await_suspend types. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr100673.C: New test.=