testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr40074.c
blobb75061a8116c34f609eb9ed59256b6eea87976a4
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 typedef struct {
9 int a;
10 int b;
11 int c;
12 int d;
13 } s;
16 s arr[N] = {{7,0,1,5}, {7,2,3,5}, {7,4,5,5}, {7,6,7,5}, {7,8,9,5}, {7,10,11,5}, {7,12,13,5}, {7,14,15,5}, {7,16,17,5}, {7,18,19,5}, {7,20,21,5}, {7,22,23,5}, {7,24,25,5}, {7,26,27,5}, {7,28,29,5}, {7,30,31,5}};
18 __attribute__ ((noinline)) int
19 main1 ()
21 s *p = arr, *q = arr + 1;
22 int res[N];
23 int i;
25 for (i = 0; i < N-1; i++)
27 res[i] = p->b + p->d + q->b;
28 p++;
29 q++;
32 /* check results: */
33 #pragma GCC novector
34 for (i = 0; i < N-1; i++)
36 if (res[i] != arr[i].b + arr[i].d + arr[i+1].b)
37 abort ();
40 return 0;
43 int main (void)
45 int i;
47 check_vect ();
49 main1 ();
51 return 0;