Add __builtion_unreachable to vector::size(), vector::capacity()
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-reduc-mul_1.c
blob3b41ec9e67b21480d6dbbc4ef2e6ed7037a6d595
1 /* { dg-require-effective-target vect_int_mult } */
2 /* { dg-require-effective-target whole_vector_shift } */
4 /* Write a reduction loop to be reduced using vector shifts. */
6 #include "tree-vect.h"
8 extern void abort(void);
10 unsigned char in[16];
12 int
13 main (unsigned char argc, char **argv)
15 unsigned char i = 0;
16 unsigned char sum = 1;
18 check_vect ();
20 for (i = 0; i < 16; i++)
21 in[i] = i + i + 1;
23 /* Prevent constant propagation of the entire loop below. */
24 asm volatile ("" : : : "memory");
26 for (i = 0; i < 16; i++)
27 sum *= in[i];
29 if (sum != 33)
31 __builtin_printf("Failed %d\n", sum);
32 abort();
35 return 0;
38 /* { dg-final { scan-tree-dump "Reduce using vector shifts" "vect" } } */