Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Add tests for bugs that surfaced during development.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jul 28, 2017
1 parent cdde76a commit 08eea06
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,17 @@ end

############################################################################################


@testset "bug: non-Int index to unsafe_load" begin
@eval function array_load_index(a)
return a[UInt64(1)]
end

a = [1]
p = pointer(a)
dp = CUDAnative.DevicePtr(p)
da = CUDAnative.CuDeviceArray(1, dp)
array_load_index(da)
end

end
11 changes: 11 additions & 0 deletions test/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ end
end
end

@testset "LLVM D32593" begin
@eval struct llvm_D32593_struct
foo::Float32
bar::Float32
end

@eval llvm_D32593(arr) = arr[1].foo

CUDAnative.code_llvm(DevNull, llvm_D32593, Tuple{CuDeviceVector{llvm_D32593_struct,AS.Global}})
end

end


Expand Down

0 comments on commit 08eea06

Please sign in to comment.