public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100127] [coroutines] internal compiler error compiling promise with custom awaiter Date: Fri, 17 Dec 2021 16:58:10 +0000 [thread overview] Message-ID: <bug-100127-4-zz6EDPwOYX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100127-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100127 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>: https://gcc.gnu.org/g:2466a8d0dd40d05cb4a239d7d4a21bbd9ffab698 commit r12-6046-g2466a8d0dd40d05cb4a239d7d4a21bbd9ffab698 Author: Iain Sandoe <iain@sandoe.co.uk> Date: Sat Oct 2 17:20:08 2021 +0100 coroutines: Handle initial awaiters with non-void returns [PR 100127]. The way in which a C++20 coroutine is specified discards any value that might be returned from the initial or final await expressions. This ICE was caused by an initial await expression with an await_resume () returning a reference, the function rewrite code was not set up to expect this. Fixed by looking through any indirection present and by explicitly discarding the value, if any, returned by await_resume(). It does not seem useful to make a diagnostic for this, since the user could define a generic awaiter that usefully returns values when used in a different position from the initial (or final) await expressions. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR c++/100127 gcc/cp/ChangeLog: * coroutines.cc (coro_rewrite_function_body): Handle initial await expressions that try to produce a reference value. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr100127.C: New test.
next prev parent reply other threads:[~2021-12-17 16:58 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-16 22:08 [Bug c++/100127] New: " riki--b at hotmail dot it 2021-04-19 8:15 ` [Bug c++/100127] " iains at gcc dot gnu.org 2021-04-19 18:55 ` riki--b at hotmail dot it 2021-10-01 20:01 ` iains at gcc dot gnu.org 2021-10-02 15:54 ` iains at gcc dot gnu.org 2021-12-17 16:58 ` cvs-commit at gcc dot gnu.org [this message] 2022-06-28 10:44 ` jakub at gcc dot gnu.org 2023-03-03 5:36 ` cvs-commit at gcc dot gnu.org 2023-07-07 9:36 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100127-4-zz6EDPwOYX@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).