PR target/27842
[official-gcc.git] / gcc / testsuite / gcc.dg / vmx / pr27842.c
blob56b2970e423ca8076810a3742f1ecc14ea2f1057
1 /* { dg-do run } */
3 #include <altivec.h>
5 extern void abort (void);
6 extern int memcmp (const void *, const void *, __SIZE_TYPE__);
8 void test (vector float *p, int n)
10 int i;
11 for (i = 0; i < n; i++)
12 p[i] = vec_abs (p[i]);
15 int
16 main (void)
18 vector float p = (vector float){ 0.5, 0.5, 0.5, 0.5 };
19 vector float q = p;
21 test (&p, 1);
23 if (memcmp (&p, &q, sizeof (p)))
24 abort ();
26 return 0;