fix tsizeof3 for aarch64 (#13169)

This commit is contained in:
Jasper Jenkins 2020-01-16 05:21:12 -08:00 • committed by Andreas Rumpf
commit d245d4cf09
3 changed files with 22 additions and 20 deletions

20
tests/misc/tsizeof4.nim Normal file
View file

@ -0,0 +1,20 @@
discard """
disabled: "arm64"
"""
# bug #11792
type
m256d {.importc: "__m256d", header: "immintrin.h".} = object
MyKind = enum
k1, k2, k3
MyTypeObj = object
kind: MyKind
x: int
amount: UncheckedArray[m256d]
# The sizeof(MyTypeObj) is not equal to (sizeof(int) + sizeof(MyKind)) due to
# alignment requirement of m256d, make sure Nim understands that
doAssert(sizeof(MyTypeObj) > sizeof(int) + sizeof(MyKind))