OSDN Git Service

2009-11-28 Kai Tietz <kai.tietz@onevision.com>
[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 -maltivec" { target { powerpc*-*-linux* && powerpc_altivec_ok } } } */
5
6 typedef unsigned __attribute__ ((__mode__ (__pointer__))) uintptr_t;
7
8 #undef __vector
9 #define __vector __attribute__ ((__vector_size__ (16)))
10
11 typedef __vector signed char qword;
12 typedef __vector uintptr_t VU;
13
14 extern short g[192 + 16];
15
16 void f (qword);
17
18 void f1 (unsigned ctr)
19 {
20   VU pin;
21
22   pin = (VU){(uintptr_t) &g[16]};
23   do
24     {
25       f ((qword) pin);
26       ctr--;
27     }
28   while (ctr);
29 }
30
31 /* Ignore a warning that is irrelevant to the purpose of this test.  */
32 /* { dg-prune-output ".*GCC vector passed by reference.*" } */