LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-reduc-pattern-3.c
blob5dd2e504f36ea48d6eff335290f6bbb20b9782fb
1 /* { dg-require-effective-target vect_int_mult } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 10
7 #define RES 1024
9 /* A reduction pattern in which there is no data ref in
10 the loop and one operand is defined outside of the loop. */
12 __attribute__ ((noinline)) int
13 foo (int v)
15 int i;
16 int result = 1;
18 ++v;
19 for (i = 0; i < N; i++)
20 result *= v;
22 return result;
25 int
26 main (void)
28 int res;
30 check_vect ();
32 res = foo (1);
33 if (res != RES)
34 abort ();
36 return 0;
39 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */