Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-53.c
blob49aba7d2bcc9dc18e677eec359de69370f138481
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 256
8 typedef float afloat __attribute__ ((__aligned__(16)));
10 void bar (const float *pa, const float *pb, const float *pc)
12 int i;
14 /* check results: */
15 for (i = 0; i < N; i++)
17 if (pa[i] != (pb[i] * pc[i]))
18 abort ();
21 return;
25 int
26 main1 (int n, afloat *pa, float *pb, float *pc)
28 int i;
30 for (i = 0; i < n; i++)
32 pa[i] = pb[i] * pc[i];
35 bar (pa,pb,pc);
37 return 0;
40 int main (void)
42 int i;
43 afloat a[N];
44 afloat b[N+1] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60};
45 afloat c[N+1] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
47 check_vect ();
49 main1 (N,a,&b[1],c);
50 main1 (N,a,&b[1],&c[1]);
51 return 0;
54 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */