diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/altivec-21.c')
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/altivec-21.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-21.c b/gcc/testsuite/gcc.target/powerpc/altivec-21.c new file mode 100644 index 000000000..906aa197a --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-21.c @@ -0,0 +1,18 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec" } */ + +#include <altivec.h> + +extern void preansi(); + +typedef void (*pvecfunc) (); + +void foo(pvecfunc pvf) { + vector int v = (vector int){1, 2, 3, 4}; +#ifndef __LP64__ + preansi (4, 4.0, v); /* { dg-error "AltiVec argument passed to unprototyped function" "" { target ilp32 } } */ + (*pvf) (4, 4.0, v); /* { dg-error "AltiVec argument passed to unprototyped function" "" { target ilp32 } } */ +#endif /* __LP64__ */ +} + |