Skip to content

Commit 53ea47e

Browse files
committed
check that reinterp on vector of tuples doesnt segfault
1 parent 11724ff commit 53ea47e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/inference.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,3 +776,15 @@ function break_21369()
776776
end
777777
end
778778
@test_throws ErrorException break_21369() # not TypeError
779+
780+
781+
function segfaultfunction_20847{N, T}(A::Vector{NTuple{N, T}})
782+
B = reinterpret(T, A, (N, length(A)))
783+
return nothing
784+
end
785+
786+
tuplevec_20847 = Tuple{Float64, Float64}[(0.0,0.0), (1.0,0.0)]
787+
788+
for A in (1,)
789+
@test segfaultfunction_20847(tuplevec_20847) == nothing
790+
end

0 commit comments

Comments
 (0)