diff options
Diffstat (limited to 'gcc/testsuite/gcc.apple/altivec-2.c')
-rw-r--r-- | gcc/testsuite/gcc.apple/altivec-2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/altivec-2.c b/gcc/testsuite/gcc.apple/altivec-2.c new file mode 100644 index 00000000000..23eaf3d230d --- /dev/null +++ b/gcc/testsuite/gcc.apple/altivec-2.c @@ -0,0 +1,22 @@ +/* APPLE LOCAL file AltiVec */ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-options "-faltivec" } */ + +/* Check whether AltiVec allows for 'bool' + and 'pixel' to be #defined to mean other things. */ + +extern void abort (void); +#define CHECK_IF(E) if(!(E)) abort() + +#define bool char +#define pixel unsigned char + +int main(void) { + bool x1; + pixel x2; + + CHECK_IF(sizeof(x1) == 1); + CHECK_IF(sizeof(x2) == 1); + return 0; +} + |