diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index 78bf87b3d553e4..acb86c314cd682 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -1614,6 +1614,7 @@ function try_resolve_finalizer!(ir::IRCode, idx::Int, finalizer_idx::Int, defuse end all(check_defuse, defuse.uses) || return nothing all(check_defuse, defuse.defs) || return nothing + bb_insert_block != 0 || return nothing # there is no post-dominator of all uses # Check #3 dominates(domtree, finalizer_bb, bb_insert_block) || return nothing