diff --git a/Project.toml b/Project.toml index 271e3d45..37c61fa9 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GPUCompiler" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "1.6.0" +version = "1.6.1" authors = ["Tim Besard "] [deps] diff --git a/src/gcn.jl b/src/gcn.jl index 6030773e..36165a2c 100644 --- a/src/gcn.jl +++ b/src/gcn.jl @@ -87,7 +87,7 @@ function lower_throw_extra!(mod::LLVM.Module) # remove the call nargs = length(parameters(f)) call_args = arguments(call) - erase!(LLVM.parent(call), call) + erase!(call) # HACK: kill the exceptions' unused arguments for arg in call_args diff --git a/test/gcn.jl b/test/gcn.jl index 0108d6a5..8e1f2ad0 100644 --- a/test/gcn.jl +++ b/test/gcn.jl @@ -21,6 +21,22 @@ sink_gcn(i) = sink(i, Val(5)) end end +@testset "bounds errors" begin + mod = @eval module $(gensym()) + function kernel() + Base.throw_boundserror(1, 2) + return + end + end + + @test @filecheck begin + check"CHECK-NOT: {{julia_throw_boundserror_[0-9]+}}" + check"CHECK: @gpu_report_exception" + check"CHECK: @gpu_signal_exception" + GCN.code_llvm(mod.kernel, Tuple{}) + end +end + end ############################################################################################