Skip to content

Commit ee313e5

Browse files
committed
add test case from JuliaGPU/CUDA.jl#2241
1 parent fcbbaa7 commit ee313e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/compiler/AbstractInterpreter.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,15 @@ inner52938(x, types::Type, args...; kwargs...) = x
201201
outer52938(x) = @inline inner52938(x, Tuple{}; foo=Ref(42), bar=1)
202202
@test fully_eliminated(outer52938, (Any,); interp=Issue52938Interp(), retval=Argument(2))
203203

204+
# https://github.com/JuliaGPU/CUDA.jl/issues/2241
205+
@newinterp Cuda2241Interp
206+
@MethodTable CUDA_2241_MT
207+
CC.method_table(interp::Cuda2241Interp) = CC.OverlayMethodTable(CC.get_inference_world(interp), CUDA_2241_MT)
208+
inner52938(x, types::Type, args...; kwargs...) = x
209+
outer52938(x) = @inline inner52938(x, Tuple{}; foo=Ref(42), bar=1)
210+
@consistent_overlay CUDA_2241_MT @inline Base.throw_boundserror(A, I) = error()
211+
@test fully_eliminated(outer52938, (Any,); interp=Cuda2241Interp(), retval=Argument(2))
212+
204213
# Should not concrete-eval overlayed methods in semi-concrete interpretation
205214
@newinterp OverlaySinInterp
206215
@MethodTable OVERLAY_SIN_MT

0 commit comments

Comments
 (0)