summary refs log tree commit diff stats
path: root/tests/collections/thardalignmentconstraint.nim
blob: e3a3081b9539d8145abc2d50a8b34e1a1510c008 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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