From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6C5D384F01B; Wed, 7 Sep 2022 14:47:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6C5D384F01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662562077; bh=h/03FV/Z49QIoF7tknF6HpsmEqt1vqjSi4HUwjkNeV0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WZH5yKTYNa8Ib8YRH0ThNj/8MBUn+mBVUbISck7XnfCoraoBQjiXIqxYVSMHGdqQZ QMSNeRC5o3g30Cd+MU6SM4+RWt4X8ZFSYoR14kC8xNUtbHoXcKpy6nqJSOGFXG354v FX47syTBmWWibgEsUPZ4dTvkVcoEJ7SpvdfDX1g8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106713] [11/12/13 Regression] Coroutine regression in GCC 11.3.0: if (co_await ...) crashes with a jump to ud2 since r12-3529-g70ee703c479081ac Date: Wed, 07 Sep 2022 14:47:56 +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: 11.3.0 X-Bugzilla-Keywords: wrong-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: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106713 --- Comment #5 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:a961ad1b13b9c294d4565344912b8e35ba71b369 commit r13-2524-ga961ad1b13b9c294d4565344912b8e35ba71b369 Author: Arsen Arsenovi=C3=84 Date: Sun Sep 4 21:04:23 2022 +0200 c++: top level bind when rewriting coroutines [PR106188] In the edge case of a coroutine not containing any locals, the ifcd/swi= tch temporaries would get added to the coroutine frame, corrupting its layout. To prevent this, we can make sure there is always a BIND_EXPR at the top of the function body, and thus, always a place for our new temporaries to go without interfering with the coroutine frame. PR c++/106188 - Incorrect frame layout after transforming conditional statement without top-level bind expression PR c++/106713 - if (co_await ...) crashes with a jump to ud2 PR c++/106188 PR c++/106713 gcc/cp/ChangeLog: * coroutines.cc (coro_rewrite_function_body): Ensure we have a BIND_EXPR wrapping the function body. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr106188.C: New test. Signed-off-by: Arsen Arsenovi=C3=84 =