Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vmx / bug-1.c
blobfdf392d5f9b09c1c18b6c096c4064038beaf3113
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <stddef.h>
4 #include <altivec.h>
6 #define NPAGES 20
7 #define NSKIP 10
8 static vector float big[NPAGES*4096/16] = { {1,1,1,1} };
9 /* NPAGES pages worth. */
11 static int failed;
13 static void f(vector float *p)
15 int i = 1;
16 p = (vector float *)(((ptrdiff_t)p + 4095) & ~4095);
18 i += NSKIP;
19 p += NSKIP*4096/16;
21 while (i < NPAGES)
23 if (!vec_all_eq(*p,((vector float){0,0,0,0})))
25 printf("*p isn't zero at 0x%p, page %d\n", p, i);
26 failed++;
28 i++;
29 p += 4096/16;
33 int main(void)
35 f(big);
36 if (failed)
37 abort ();
38 return 0;