From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7CA7F386F47A; Tue, 9 Mar 2021 15:46:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CA7F386F47A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99459] [11 Regression] Many coroutines regressions on armv7hl-linux-gnueabi Date: Tue, 09 Mar 2021 15:46:11 +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.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Tue, 09 Mar 2021 15:46:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99459 --- Comment #11 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:4e252e23d34932f13f39cc6544bf5c9379fa2a87 commit r11-7582-g4e252e23d34932f13f39cc6544bf5c9379fa2a87 Author: Jakub Jelinek Date: Tue Mar 9 16:44:27 2021 +0100 c++: Fix coroutines on targetm.cxx.cdtor_return_this targets [PR99459] The r11-7528 build_co_await changes broke coroutines on arm*-linux-gnua= bi, 2780 ^FAIL.*coroutines/ in total. The problem is that arm is targetm.cxx.cdtor_return_this target where both ctors and dtors in the ABI return this pointer rather than void, and build_new_method_call_1 does: else if (call !=3D error_mark_node && DECL_DESTRUCTOR_P (cand->fn) && !VOID_TYPE_P (TREE_TYPE (call))) /* An explicit call of the form "x->~X()" has type "void". However, on platforms where destructors return "this" (i.e., those where targetm.cxx.cdtor_returns_this is true), such calls will appear to have a return value of pointer type to the low-level call machinery. We do not want to change the low-level machinery, since we want to be able to optimize "delete f()" on such platforms as "operator delete(~X(f()))" (rather than generating "t =3D f(), ~X(t), operator delete (t)"). */ call =3D build_nop (void_type_node, call); The new code in build_co_await relies on build_special_member_call returned expression being a CALL_EXPR, but due to the build_nop in there it is a NOP_EXPR around the CALL_EXPR. It can't be stripped with STRIP_NOPS because void has different mode from the pointer mode. 2021-03-09 Jakub Jelinek PR c++/99459 * coroutines.cc (build_co_await): Look through NOP_EXPRs in build_special_member_call return value to find the CALL_EXPR. Simplify.=