From c765cfd95bd3f8292b3380f74c244ee3b0b60c2e Mon Sep 17 00:00:00 2001 From: "Arch D. Robison" Date: Fri, 25 Mar 2016 16:57:11 -0500 Subject: [PATCH] Add test to check if LLVM and Julia agree on alignment. --- test/vecelement.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/vecelement.jl b/test/vecelement.jl index 5106e46cc022a6..c259fdcc72a31b 100644 --- a/test/vecelement.jl +++ b/test/vecelement.jl @@ -47,3 +47,14 @@ end check(Herd{1,Int}((1,))) check(Herd{2,Int}((4,5))) check(Herd{4,Int}((16,17,18,19))) + +immutable Gr{N, T} + u::T + v::Bunch{N,T} + w::T +end + +a = Vector{Gr{2,Float64}}(2) +a[2] = Gr(1.0, Bunch((VecElement(2.0), VecElement(3.0))), 4.0) +a[1] = Gr(5.0, Bunch((VecElement(6.0), VecElement(7.0))), 8.0) +@test a[2] == Gr(1.0, Bunch((VecElement(2.0), VecElement(3.0))), 4.0)