Merge to HEAD at tree-cleanup-merge-20041024 .
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-35.c
blobb29da494942509f5448976e013736de9238ef80a
1 /* { dg-do run { target powerpc*-*-* } } */
2 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
3 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
4 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
6 #include <stdarg.h>
7 #include "tree-vect.h"
9 typedef char achar __attribute__ ((__aligned__(16)));
11 #define N 16
12 achar x[N];
14 int main1 ()
16 union {
17 achar a[N];
18 achar b[N];
19 } s;
20 int i;
22 for (i = 0; i < N; i++)
24 s.b[i] = 3*i;
27 for (i = 0; i < N; i++)
29 s.a[i] = s.b[i] + 1;
32 /* check results: */
33 for (i = 0; i < N; i++)
35 if (s.a[i] != s.b[i])
36 abort ();
39 return 0;
42 int main (void)
44 check_vect ();
46 return main1 ();
50 /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */