aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.cc
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@riscy-ip.com>2024-08-12 11:04:51 +0100
committerJoern Rennecke <joern.rennecke@riscy-ip.com>2024-08-12 11:06:17 +0100
commit40b9a7beb79acbea569be3066768cfb62c0f7c31 (patch)
tree66783b8d261e79018e9d02c58db523c66a9b13fb /gcc/except.cc
parent9ab8681db6c7736357a8713afec7c7b09080cba9 (diff)
downloadgcc-40b9a7beb79acbea569be3066768cfb62c0f7c31.zip
gcc-40b9a7beb79acbea569be3066768cfb62c0f7c31.tar.gz
gcc-40b9a7beb79acbea569be3066768cfb62c0f7c31.tar.bz2
Avoid cfg corruption when using sjlj exceptions where loops are present in the assign_params emitted code.
2024-08-06 Joern Rennecke <joern.rennecke@riscy-ip.com> gcc/ * except.cc (sjlj_emit_function_enter): Set fn_begin_outside_block again if encountering a jump instruction.
Diffstat (limited to 'gcc/except.cc')
-rw-r--r--gcc/except.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/except.cc b/gcc/except.cc
index b5886e9..5bb5edb 100644
--- a/gcc/except.cc
+++ b/gcc/except.cc
@@ -1228,6 +1228,10 @@ sjlj_emit_function_enter (rtx_code_label *dispatch_label)
else if (NOTE_INSN_BASIC_BLOCK_P (fn_begin))
fn_begin_outside_block = false;
}
+ /* assign_params can indirectly call emit_block_move_via_loop, e.g.
+ for g++.dg/torture/pr85627.C for 16-bit targets. */
+ else if (JUMP_P (fn_begin))
+ fn_begin_outside_block = true;
#ifdef DONT_USE_BUILTIN_SETJMP
if (dispatch_label)