https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93199
--- Comment #21 from Martin Liška <marxin at gcc dot gnu.org> --- > Well - there's the leh_state passed to both callers of the function > so I expected a patch to amend that rather than adding an on-the-side > caching hash-map. So basically whenever we push a non-CLEANUP > update leh_state->xyz and when backtracking update it back (the whole > process looked recursive from a quick look). Yes, it's recurring, but leh_state instances are different: #0 cleanup_is_dead_in (reg=0x7ffff5e94478) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1640 #1 0x00000000010c0ca6 in lower_try_finally (state=0x7fffffffc060, tp=0x7ffff2f0f4d0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1676 #2 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffc060, gsi=0x7fffffffc020) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 #3 0x00000000010c1e8a in lower_eh_constructs_1 (state=0x7fffffffc060, pseq=0x7ffff2f0f4c0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2158 #4 0x00000000010c0d53 in lower_try_finally (state=0x7fffffffc220, tp=0x7ffff2f0f498) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1693 #5 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffc220, gsi=0x7fffffffc1e0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 #6 0x00000000010c1e8a in lower_eh_constructs_1 (state=0x7fffffffc220, pseq=0x7ffff2f0f488) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2158 #7 0x00000000010c0d53 in lower_try_finally (state=0x7fffffffc3e0, tp=0x7ffff2f0f460) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1693 #8 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffc3e0, gsi=0x7fffffffc3a0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 #9 0x00000000010c1e8a in lower_eh_constructs_1 (state=0x7fffffffc3e0, pseq=0x7ffff2f0f450) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2158 #10 0x00000000010c0d53 in lower_try_finally (state=0x7fffffffc5a0, tp=0x7ffff2f0f428) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1693 #11 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffc5a0, gsi=0x7fffffffc560) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 #12 0x00000000010c1e8a in lower_eh_constructs_1 (state=0x7fffffffc5a0, pseq=0x7ffff2f0f418) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2158 #13 0x00000000010c0d53 in lower_try_finally (state=0x7fffffffc760, tp=0x7ffff2f0f3f0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1693 #14 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffc760, gsi=0x7fffffffc720) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 #15 0x00000000010c1e8a in lower_eh_constructs_1 (state=0x7fffffffc760, pseq=0x7ffff2f0f3e0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2158 #16 0x00000000010c0d53 in lower_try_finally (state=0x7fffffffc920, tp=0x7ffff2f0f3b8) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1693 #17 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffc920, gsi=0x7fffffffc8e0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 #18 0x00000000010c1e8a in lower_eh_constructs_1 (state=0x7fffffffc920, pseq=0x7ffff2f0f3a8) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2158 #19 0x00000000010c0d53 in lower_try_finally (state=0x7fffffffcae0, tp=0x7ffff2f0f380) at /home/marxin/Programming/gcc/gcc/tree-eh.c:1693 #20 0x00000000010c1cdf in lower_eh_constructs_2 (state=0x7fffffffcae0, gsi=0x7fffffffcaa0) at /home/marxin/Programming/gcc/gcc/tree-eh.c:2099 where a new 'state' is always created here: 1769 static gimple_seq 1770 lower_catch (struct leh_state *state, gtry *tp) 1771 { 1772 eh_region try_region = NULL; 1773 struct leh_state this_state = *state; ...