LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-reduc-pattern-1b-big-array.c
blobbe03c7d011da3422d64f25d6a185c40ea8ab4d8a
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
7 unsigned char udata_ch[N];
8 #define SUM N*(N-1)
10 __attribute__ ((noinline)) int
11 foo ()
13 int i;
14 unsigned int intsum = 0;
16 for (i = 0; i < N; i++)
18 udata_ch[i] = i*2;
19 asm volatile ("" ::: "memory");
22 /* widenning sum: sum chars into int. */
23 for (i = 0; i < N; i++)
25 intsum += udata_ch[i];
28 /* check results: */
29 if (intsum != SUM)
30 abort ();
32 return 0;
35 int
36 main (void)
38 check_vect ();
39 return foo ();
42 /* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si || vect_unpack } } } } */
44 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */