Skip to content

Commit 5040e53

Browse files
committed
add test for #28079
1 parent 88f7957 commit 5040e53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/compiler/compiler.jl

+9
Original file line numberDiff line numberDiff line change
@@ -1739,3 +1739,12 @@ T27078 = Vector{Vector{T}} where T
17391739
# issue #28070
17401740
g28070(f, args...) = f(args...)
17411741
@test @inferred g28070(Core._apply, Base.:/, (1.0, 1.0)) == 1.0
1742+
1743+
# issue #28079
1744+
struct Foo28079 end
1745+
@inline h28079(x, args...) = g28079(x, args...)
1746+
@inline g28079(::Any, f, args...) = f(args...)
1747+
test28079(p, n, m) = h28079(Foo28079(), Base.pointerref, p, n, m)
1748+
cinfo_unoptimized = code_typed(test28079, (Ptr{Float32}, Int, Int); optimize=false)[].first
1749+
cinfo_optimized = code_typed(test28079, (Ptr{Float32}, Int, Int); optimize=true)[].first
1750+
@test cinfo_unoptimized.ssavaluetypes[end-1] === cinfo_optimized.ssavaluetypes[end-1] === Float32

0 commit comments

Comments
 (0)