d: Fix gdc -O2 -mavx generates misaligned vmovdqa instruction [PR114171]
[official-gcc.git] / gcc / testsuite / gdc.dg / torture / pr114171.d
blob0f9ffcab916397a524402c01f5e4e15f98f56afa
1 // { dg-do run }
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
4 import gcc.builtins;
6 struct S1
8 string label;
11 struct S2
13 ulong pad;
14 S1 label;
17 pragma(inline, false)
18 auto newitem()
20 void *p = __builtin_malloc(S2.sizeof);
21 __builtin_memset(p, 0, S2.sizeof);
22 return cast(S2*) p;
25 int main()
27 auto bn = newitem();
28 return bn.label is S1.init ? 0 : 1;