diff options
author | Arne Döring <arne.doering@gmx.net> | 2020-04-19 07:52:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 07:52:01 +0200 |
commit | 4005f0d0e40fb57efd8144c065a7ba56d940b572 (patch) | |
tree | 7df2d805351ed3c72114d00c773ff7d581337eda /tests | |
parent | a8f030fea21894e51c188a5804b0bbf787335f4d (diff) | |
download | Nim-4005f0d0e40fb57efd8144c065a7ba56d940b572.tar.gz |
forward type alignment information to seqs (#12430)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/collections/thardalignmentconstraint.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/collections/thardalignmentconstraint.nim b/tests/collections/thardalignmentconstraint.nim new file mode 100644 index 000000000..e3a3081b9 --- /dev/null +++ b/tests/collections/thardalignmentconstraint.nim @@ -0,0 +1,17 @@ +discard """ +disabled: true +""" + +# does not yet work + +{.passC: "-march=native".} + +type + m256d {.importc: "__m256d", header: "immintrin.h".} = object + +proc set1(x: float): m256d {.importc: "_mm256_set1_pd", header: "immintrin.h".} + +for _ in 1..1000: + var x = newSeq[m256d](1) + x[0] = set1(1.0) # test if operation causes segfault + doAssert (cast[uint](x[0].addr) and 31) == 0 |