d: Merge upstream dmd 47871363d, druntime, c52e28b7, phobos 99e9c1b77.
[official-gcc.git] / gcc / testsuite / gdc.dg / ubsan / pr88957.d
blob23433d5861f7e5793078f9cbeb1ececf204fdeda
1 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88957
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } }
4 // { dg-additional-options "-fsanitize=undefined" }
6 alias int4 = __vector(int[4]);
8 int fn(const int[4] x)
10 int sum = 0;
11 foreach (i; x) sum += i;
12 return sum;
15 void pr88957()
17 auto x = fn(int4.init.array);
18 auto y = fn(int4(2).array);