OSDN Git Service

* lib/target-supports.exp (check_effective_target_vect_int): New
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-45.c
1 /* { dg-require-effective-target vect_float } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 256
7
8
9 void bar (const float *pa, const float *pb, const float *pc) 
10 {
11   int i;
12
13   /* check results:  */
14   for (i = 0; i < N; i++)
15     {
16       if (pa[i] != (pb[i] * pc[i]))
17         abort ();
18     }
19
20   return;
21 }
22
23
24 int
25 main1 (float *pa, float *pb, float *pc)
26 {
27   int i;
28
29   for (i = 0; i < N; i++)
30     {
31       pa[i] = pb[i] * pc[i];
32     }
33
34   bar (pa,pb,pc);
35
36   return 0;
37 }
38
39 int main (void)
40 {
41   int i;
42   float a[N];
43   float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
44   float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
45
46   check_vect ();
47
48   main1 (a,b,c);
49   return 0;
50 }
51
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */