Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vect / vect-115.c
blobfe055fb0defc3cc644f41505391a645fbc37b9d5
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 struct s{
9 int b[N];
10 int c[N];
11 int m;
14 struct t{
15 struct s strc_s;
16 int m;
19 struct test1{
20 struct t strc_t;
21 struct t *ptr_t;
22 int k;
23 int l;
26 int main1 ()
28 int i;
29 struct test1 tmp1;
30 int a[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
31 struct t tmp2;
33 tmp1.ptr_t = &tmp2;
35 /* DR bases comparison: record and array. */
36 for (i = 0; i < N; i++)
38 tmp1.strc_t.strc_s.b[i] = a[i];
41 /* Check results. */
42 for (i = 0; i < N; i++)
44 if (tmp1.strc_t.strc_s.b[i] != a[i])
45 abort();
48 /* DR bases comparison: record containing ptr and array. */
49 for (i = 0; i < N; i++)
51 tmp1.ptr_t->strc_s.c[i] = a[i];
54 /* Check results. */
55 for (i = 0; i < N; i++)
57 if (tmp1.ptr_t->strc_s.c[i] != a[i])
58 abort();
62 return 0;
65 int main (void)
67 check_vect ();
69 return main1 ();
72 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
73 /* { dg-final { cleanup-tree-dump "vect" } } */