]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR rtl-optimization/106421: ICE in bypass_block from non-local goto.
authorRoger Sayle <roger@nextmovesoftware.com>
Tue, 10 Jan 2023 14:05:46 +0000 (14:05 +0000)
committerRoger Sayle <roger@nextmovesoftware.com>
Tue, 10 Jan 2023 14:05:46 +0000 (14:05 +0000)
commit851e1ba03f9de699a754dd8648fc151c3e26d697
tree465ebf80de5aa0fe8590316098d6a6ddf359943c
parentc389991432da2bcc335a2b4fb7e502d28a6b3346
PR rtl-optimization/106421: ICE in bypass_block from non-local goto.

This patch fixes PR rtl-optimization/106421, an ICE-on-valid (but
undefined) regression.  The fix, as proposed by Richard Biener, is to
defend against BLOCK_FOR_INSN returning NULL in cprop's bypass_block.

2023-01-10  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
PR rtl-optimization/106421
* cprop.cc (bypass_block): Check that DEST is local to this
function (non-NULL) before calling find_edge.

gcc/testsuite/ChangeLog
PR rtl-optimization/106421
* gcc.dg/pr106421.c: New test case.
gcc/cprop.cc
gcc/testsuite/gcc.dg/pr106421.c [new file with mode: 0644]