c++: wrong error due to std::initializer_list opt [PR116476]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr97678.c
blob1fa56326422e832e82bb6f1739f14ea1a1cb4955
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-require-effective-target vect_int_mult } */
3 /* { dg-require-effective-target vect_pack_trunc } */
4 /* { dg-additional-options "-mavx2" { target avx2_runtime } } */
6 #include "tree-vect.h"
8 int
9 main ()
11 unsigned int i = 0;
12 unsigned short b[158 * 2];
14 check_vect ();
16 for (i = 0; i < 158; i++)
18 b[i * 2] = i * 7;
19 b[i * 2 + 1] = i * 8;
22 #pragma GCC novector
23 for (i = 0; i < 158; ++i)
24 if (b[i*2] != (unsigned short)(i*7)
25 || b[i*2+1] != (unsigned short)(i*8))
26 abort ();
28 return 0;
31 /* The init loop should be vectorized with SLP. */
32 /* We don't yet support SLP inductions for variable length vectors. */
33 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail vect_variable_length } } } */