Imported Upstream version 4.7.3
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / vect / pr37027.c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3
4 #include <stdarg.h>
5
6 struct mystr
7 {
8   int f1;
9   int f2;
10 };
11
12 struct mystr a[16];
13 struct mystr b[16];
14 int res1, res2;
15
16
17 void
18 foo (void)
19 {
20   int i;
21   int sum1;
22   int sum2;
23
24   for (i = 0; i < 16; i++)
25   {
26     sum1 += a[i].f1 + b[i].f1;
27     sum2 += a[i].f2 + b[i].f2;
28   }
29
30   res1 = sum1;
31   res2 = sum2;
32 }
33
34 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */
35 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_add } } } */
36 /* { dg-final { cleanup-tree-dump "vect" } } */
37