2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-89.c
blob4a6e7ae47f7cfb87ec8b382af232394a4e36270d
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 struct tmp_struct
10 int x;
11 int y[N];
14 __attribute__ ((noinline))
15 int main1 ()
17 int i, *q;
18 struct tmp_struct tmp, *p;
20 p = &tmp;
21 q = p->y;
23 for (i = 0; i < N; i++)
25 *q++ = 5;
28 /* check results: */
29 for (i = 0; i < N; i++)
31 if (p->y[i] != 5)
33 abort ();
37 return 0;
40 int main (void)
42 check_vect ();
44 return main1 ();
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
48 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_hw_misalign } } } */
49 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail vect_hw_misalign } } } */
50 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_hw_misalign } } } */
51 /* { dg-final { cleanup-tree-dump "vect" } } */