Skip to content

Commit

Permalink
Fix hang in tmerge_types_slow (#55757)
Browse files Browse the repository at this point in the history
Fixes #55751

Co-authored-by: Jameson Nash <[email protected]>
(cherry picked from commit 753296e)
  • Loading branch information
gbaraldi authored and KristofferC committed Sep 16, 2024
1 parent a29fae6 commit 41b225a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/compiler/typelimits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ end
typenames[i] = Any.name
simplify[i] = false
types[j] = widen
typenames[j] = ijname
break
end
end
Expand Down
4 changes: 4 additions & 0 deletions test/compiler/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5671,3 +5671,7 @@ end

# fieldcount on `Tuple` should constant fold, even though `.fields` not const
@test fully_eliminated(Base.fieldcount, Tuple{Type{Tuple{Nothing, Int, Int}}})

t155751 = Union{AbstractArray{UInt8, 4}, Array{Float32, 4}, Grid55751{Float32, 3, _A} where _A}
t255751 = Array{Float32, 3}
@test Core.Compiler.tmerge_types_slow(t155751,t255751) == AbstractArray # shouldn't hang

0 comments on commit 41b225a

Please sign in to comment.