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 rtl-optimization/104989] [9/10/11/12 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.cc:2797 (error: flow control insn inside a basic block) Date: Tue, 22 Mar 2022 07:40:18 +0000 [thread overview] Message-ID: <bug-104989-4-4ecXie3I0t@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104989-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104989 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:6adbb51eaa85f5bfed1ee06327daca306d48986d commit r12-7749-g6adbb51eaa85f5bfed1ee06327daca306d48986d Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Mar 22 08:39:40 2022 +0100 calls: Fix error recovery after sorry differently [PR104989] On Mon, Feb 28, 2022 at 07:52:56AM -0000, Roger Sayle wrote: > This patch resolves PR c++/84964 which is an ICE in the middle-end after > emitting a "sorry, unimplemented" message, and is a regression from > earlier releases of GCC. This issue is that after encountering a > function call requiring an unreasonable amount of stack space, the > code continues and falls foul of an assert checking that stack pointer > has been correctly updated. The fix is to (locally) consider aborted > function calls as "no return", which skips this downstream sanity check. As can be seen on PR104989, just setting ECF_NORETURN after sorry is quite risky and leads to other ICEs. The problem is that ECF_NORETURN calls better should be at the end of basic blocks that don't have any fallthru successor edges, otherwise we can ICE later. This patch instead sets sibcall_failure if in pass == 0 (sibcall_failure means that the tail call sequence is not useful/not desirable and throws it away) and otherwise sets a new bool variable that will let us pass the assertion and also throws away the whole call sequence, I think that is best for error recovery. 2022-03-22 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/104989 * calls.cc (expand_call): Don't set ECF_NORETURN in flags after sorry for passing too large argument, instead set sibcall_failure for pass == 0, or a new normal_failure flag otherwise. If normal_failure is set, don't assert all stack has been deallocated at the end and throw away the whole insn sequence. * g++.dg/other/pr104989.C: New test.
next prev parent reply other threads:[~2022-03-22 7:40 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-20 4:29 [Bug rtl-optimization/104989] New: " asolokha at gmx dot com 2022-03-21 8:55 ` [Bug rtl-optimization/104989] [9/10/11/12 Regression] " rguenth at gcc dot gnu.org 2022-03-21 9:33 ` marxin at gcc dot gnu.org 2022-03-21 10:34 ` jakub at gcc dot gnu.org 2022-03-22 7:40 ` cvs-commit at gcc dot gnu.org [this message] 2022-03-22 7:43 ` [Bug rtl-optimization/104989] [9/10/11 " jakub at gcc dot gnu.org 2022-05-27 9:47 ` [Bug rtl-optimization/104989] [10/11 " rguenth at gcc dot gnu.org 2022-06-28 10:48 ` jakub at gcc dot gnu.org 2023-04-15 17:03 ` cvs-commit at gcc dot gnu.org 2023-04-16 3:18 ` sjames at gcc dot gnu.org 2023-07-07 10:42 ` [Bug rtl-optimization/104989] [11 " 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-104989-4-4ecXie3I0t@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).