| 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 |
/* { dg-skip-if "no vector type for PSImode" { msp430-*-* } { "-mlarge" } { "" } } */ |
| 6 |
|
| 7 |
typedef __UINTPTR_TYPE__ 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 |
} |
| 31 |
|
| 32 |
/* Ignore a warning that is irrelevant to the purpose of this test. */ |
| 33 |
/* { dg-prune-output ".*GCC vector passed by reference.*" } */ |