LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-37.c
blobb6a044dfd3ad814ea974b42a5698ab648c3b313c
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 typedef struct {
9 int a;
10 int b;
11 void *c;
12 } s1;
14 int
15 foo1 (s1 *arr)
17 int i;
18 s1 *ptr = arr;
20 /* Different constant types - not SLPable. The group size is not power of 2,
21 interleaving is not supported either. */
22 for (i = 0; i < N; i++)
24 ptr->a = 6;
25 ptr->b = 7;
26 ptr->c = 0;
27 ptr++;
30 /* check results: */
31 for (i = 0; i < N; i++)
33 if (arr[i].a != 6
34 || arr[i].b != 7
35 || arr[i].c != 0)
36 abort();
40 int main (void)
42 int i;
43 s1 arr1[N];
45 check_vect ();
47 for (i = 0; i < N; i++)
49 arr1[i].a = i;
50 arr1[i].b = i * 2;
51 arr1[i].c = (void *)arr1;
52 asm volatile ("" ::: "memory");
56 foo1 (arr1);
58 return 0;
61 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
62 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */