Merge branches/gcc-4_9-branch rev 225109.
[official-gcc.git] / gcc-4_9-branch / gcc / testsuite / gcc.dg / vect / costmodel / ppc / costmodel-vect-31a.c
blob161497faf68b5db6bb727e8206260831b9b748ca
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "../../tree-vect.h"
6 #define N 32
8 struct t{
9 int k[N];
10 int l;
13 struct s{
14 char a; /* aligned */
15 char b[N-1]; /* unaligned (offset 1B) */
16 char c[N]; /* aligned (offset NB) */
17 struct t d; /* aligned (offset 2NB) */
18 struct t e; /* unaligned (offset 2N+4N+4 B) */
21 int main1 ()
23 int i;
24 struct s tmp;
26 /* unaligned */
27 for (i = 0; i < N/2; i++)
29 tmp.b[i] = 5;
32 /* check results: */
33 for (i = 0; i <N/2; i++)
35 if (tmp.b[i] != 5)
36 abort ();
39 return 0;
42 int main (void)
44 check_vect ();
46 return main1 ();
49 /* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
50 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */
51 /* { dg-final { cleanup-tree-dump "vect" } } */