OSDN Git Service

* g++.dg/opt/nothrow1.C: Use cleanup-tree-dump.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-35.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 typedef char achar __attribute__ ((__aligned__(16)));
7
8 #define N 16
9 achar x[N];
10  
11 int main1 ()
12 {  
13   union {
14     achar a[N];
15     achar b[N];
16   } s;
17   int i;
18
19   for (i = 0; i < N; i++)
20     {
21       s.b[i] = 3*i;
22     }
23
24   for (i = 0; i < N; i++)
25     {
26       s.a[i] = s.b[i] + 1;
27     }
28
29   /* check results:  */
30   for (i = 0; i < N; i++)
31     {
32       if (s.a[i] != s.b[i])
33         abort ();
34     }
35
36   return 0;
37 }
38
39 int main (void)
40
41   check_vect ();
42   
43   return main1 ();
44
45
46
47 /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
48 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
49 /* { dg-final { cleanup-tree-dump "vect" } } */