Skip to content

Commit 8872a9a

Browse files
committed
add test for 28079
1 parent 01e0894 commit 8872a9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/compiler/compiler.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,3 +1735,12 @@ Base.iterate(::Iterator27434, ::Any) = nothing
17351735
f27078(T::Type{S}) where {S} = isa(T, UnionAll) ? f27078(T.body) : T
17361736
T27078 = Vector{Vector{T}} where T
17371737
@test f27078(T27078) === T27078.body
1738+
1739+
# issue #28079
1740+
struct Foo28079 end
1741+
@inline h28079(x, args...) = g28079(x, args...)
1742+
@inline g28079(::Any, f, args...) = f(args...)
1743+
test28079(p, n, m) = h28079(Foo28079(), Base.pointerref, p, n, m)
1744+
cinfo_unoptimized = code_typed(test28079, (Ptr{Float32}, Int, Int); optimize=false)[].first
1745+
cinfo_optimized = code_typed(test28079, (Ptr{Float32}, Int, Int); optimize=true)[].first
1746+
@test cinfo_unoptimized.ssavaluetypes[end-1] === cinfo_optimized.ssavaluetypes[end-1] === Float32

0 commit comments

Comments
 (0)