Skip to content

Commit

Permalink
Add test for #55.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Feb 2, 2021
1 parent cfc5ed4 commit c39a216
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
18 changes: 18 additions & 0 deletions test/execution.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Adapt

using StaticArrays

dummy() = return

@testset "@oneapi" begin
Expand Down Expand Up @@ -516,4 +518,20 @@ end

end

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

@testset "#55: invalid integers created by alloc_opt" begin
function f(a)
x = SVector(0f0, 0f0)
v = MVector{3, Float32}(undef)
for (i,_) in enumerate(x)
v[i] = 1.0f0
end
a[1] = v[1]
return nothing
end
@oneapi f(oneArray(zeros(1)))
end


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

0 comments on commit c39a216

Please sign in to comment.