Closed
Description
Repro:
julia> using GMT
julia> code_warntype(show, Tuple{Base.GenericIOBuffer{GenericMemory{:not_atomic, UInt8, Core.AddrSpace{Core}(0x00)}}, GMT.Gdal.IDataset}; optimize=true)
ERROR: BoundsError: attempt to access 124-element Vector{Core.Compiler.DomTreeNode} at index [0]
Stacktrace:
[1] throw_boundserror(A::Vector{Core.Compiler.DomTreeNode}, I::Tuple{Int64})
@ Core.Compiler ./essentials.jl:14
[2] getindex
@ ./essentials.jl:894 [inlined]
[3] _dominates(domtree::Core.Compiler.GenericDomTree{false}, bb1::Int64, bb2::Int64)
@ Core.Compiler ./compiler/ssair/domtree.jl:622
[4] dominates
@ ./compiler/ssair/domtree.jl:605 [inlined]
[5] try_resolve_finalizer!(ir::Core.Compiler.IRCode, idx::Int64, finalizer_idx::Int64, defuse::Core.Compiler.SSADefUse, inlining::Core.Compiler.InliningState{…}, lazydomtree::Core.Compiler.LazyGenericDomtree{…}, lazypostdomtree::Core.Compiler.LazyGenericDomtree{…}, info::Core.Compiler.CallInfo)
@ Core.Compiler ./compiler/ssair/passes.jl:1619
[6] sroa_mutables!(ir::Core.Compiler.IRCode, defuses::Core.Compiler.IdDict{…}, used_ssas::Vector{…}, lazydomtree::Core.Compiler.LazyGenericDomtree{…}, inlining::Core.Compiler.InliningState{…})
Seems to be caused by #53739 because reverting that PR seems to fix it on the 1.11 backport branch.