From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4DF51397181C; Thu, 25 Feb 2021 19:34:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DF51397181C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95822] [coroutines] compiler internal error with local object with noexcept false destructor Date: Thu, 25 Feb 2021 19:34:29 +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: 10.1.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: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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, 25 Feb 2021 19:34:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95822 --- Comment #4 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:7005a50d0121954031a223ea5a6c57aaa7e3efd3 commit r11-7402-g7005a50d0121954031a223ea5a6c57aaa7e3efd3 Author: Iain Sandoe Date: Tue Feb 16 09:07:32 2021 +0000 coroutines : Remove throwing_cleanup marks from the ramp [PR95822]. The FE contains a mechanism for cleaning up return expressions if a function throws during the execution of cleanups prior to the return. If the original function has a return value with a non-trivial DTOR and the body contains a var with a DTOR that might throw, the function decl is marked "throwing_cleanup". However, we do not [in the coroutine ramp function, which is synthesised], use any body var types with DTORs that might throw. The original body [which will then contain the type with the throwing DTOR] is transformed into the actor function which only contains void returns, and is also wrapped in a try-catch block. So (a) the 'throwing_cleanup' is no longer correct for the ramp and (b) we do not need to transfer it to the actor which only contains void returns. gcc/cp/ChangeLog: PR c++/95822 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any set throwing_cleanup marker. gcc/testsuite/ChangeLog: PR c++/95822 * g++.dg/coroutines/pr95822.C: New test.=