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++/103328] [11 Regression] ICE in remap_gimple_stmt with coroutines since r11-7419-g0f161cc8494cf728 Date: Thu, 07 Apr 2022 12:04:07 +0000 [thread overview] Message-ID: <bug-103328-4-pPsUY9HT5p@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103328-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103328 --- Comment #25 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:a77c9efdeb9ecad14ecca73db0e45fcd9d884382 commit r11-9789-ga77c9efdeb9ecad14ecca73db0e45fcd9d884382 Author: Benno Evers <benno.evers@tenzir.com> Date: Sat Apr 2 17:22:33 2022 +0100 c++: Fix ICE due to shared BLOCK node in coroutine generation [PR103328] When finishing a function that is a coroutine, the function is transformed into a "ramp" function, and the original user-provided function body gets moved into a newly created "actor" function. In this case `current_function_decl` points to the ramp function, but `current_binding_level->blocks` would still point to the scope block of the user-provided function body in the actor function, so when the ramp function was finished during `poplevel()` in decl.cc, we could end up with that block being reused as the `DECL_INITIAL()` of the ramp function: subblocks = functionbody >= 0 ? current_binding_level->blocks : 0; // [...] DECL_INITIAL (current_function_decl) = block ? block : subblocks; This block would then be independently modified by subsequent passes touching either the ramp or the actor function, potentially causing an ICE depending on the order and function of these passes. gcc/cp/ChangeLog: PR c++/103328 * coroutines.cc (morph_fn_to_coro): Reset current_binding_level->blocks. gcc/testsuite/ChangeLog: PR c++/103328 * g++.dg/coroutines/pr103328.C: New test. Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk> (cherry picked from commit 0847ad33b908af88bca1e6980d0b977316d05e18)
next prev parent reply other threads:[~2022-04-07 12:04 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-19 9:56 [Bug c++/103328] New: IC in remap_gimple_stmt, at tree-inline.c:1921 avi@cloudius-systems.com 2021-11-19 10:41 ` [Bug c++/103328] ICE " rguenth at gcc dot gnu.org 2021-11-19 10:41 ` rguenth at gcc dot gnu.org 2021-11-19 11:07 ` [Bug c++/103328] [11/12 Regression] ICE in remap_gimple_stmt, at tree-inline.c:1921 since r11-7419-g0f161cc8494cf728 marxin at gcc dot gnu.org 2021-11-19 11:26 ` jakub at gcc dot gnu.org 2021-11-19 11:57 ` avi@cloudius-systems.com 2021-11-19 12:03 ` avi@cloudius-systems.com 2021-11-19 12:07 ` jakub at gcc dot gnu.org 2021-11-19 12:10 ` avi@cloudius-systems.com 2021-11-19 12:11 ` avi@cloudius-systems.com 2021-11-19 12:20 ` avi@cloudius-systems.com 2021-11-19 12:28 ` rguenth at gcc dot gnu.org 2021-11-19 12:46 ` rguenth at gcc dot gnu.org 2021-11-19 12:48 ` rguenth at gcc dot gnu.org 2021-11-19 13:42 ` rguenth at gcc dot gnu.org 2021-11-19 13:59 ` iains at gcc dot gnu.org 2021-11-19 14:05 ` rguenth at gcc dot gnu.org 2021-11-20 11:15 ` avi@cloudius-systems.com 2022-01-17 12:55 ` rguenth at gcc dot gnu.org 2022-02-26 17:17 ` piotr.grabowski at scylladb dot com 2022-03-11 2:14 ` gcc at bmevers dot de 2022-03-11 16:40 ` gcc at bmevers dot de 2022-03-15 15:29 ` avi at scylladb dot com 2022-03-22 14:48 ` [Bug c++/103328] [11/12 Regression] ICE in remap_gimple_stmt with coroutines " avi at scylladb dot com 2022-04-03 10:28 ` cvs-commit at gcc dot gnu.org 2022-04-04 15:05 ` avi at scylladb dot com 2022-04-07 12:04 ` cvs-commit at gcc dot gnu.org [this message] 2022-04-07 12:06 ` [Bug c++/103328] [11 " rguenth at gcc dot gnu.org 2022-04-07 14:42 ` avi at scylladb dot com
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-103328-4-pPsUY9HT5p@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).