OSDN Git Service

* gcc.dg/pr34856.c: Condition use of -maltivec on
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr34856.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-options "-O2 -msse2" { target { i?86-*-* x86_64-*-* } } } */
4 /* { dg-options "-O2 -w" { target { powerpc*-*-linux* } } } */
5 /* { dg-options "-O2 -maltivec" { target { powerpc*-*-linux* && powerpc_altivec_ok } } } */
6
7 typedef unsigned __attribute__ ((__mode__ (__pointer__))) uintptr_t;
8
9 #undef __vector
10 #define __vector __attribute__ ((__vector_size__ (16)))
11
12 typedef __vector signed char qword;
13 typedef __vector uintptr_t VU;
14
15 extern short g[192 + 16];
16
17 void f (qword);
18
19 void f1 (unsigned ctr)
20 {
21   VU pin;
22
23   pin = (VU){(uintptr_t) &g[16]};
24   do
25     {
26       f ((qword) pin);
27       ctr--;
28     }
29   while (ctr);
30 }