diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/vmx/harness.h')
-rw-r--r-- | gcc/testsuite/gcc.dg/vmx/harness.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vmx/harness.h b/gcc/testsuite/gcc.dg/vmx/harness.h new file mode 100644 index 000000000..faea3e97d --- /dev/null +++ b/gcc/testsuite/gcc.dg/vmx/harness.h @@ -0,0 +1,30 @@ +/* Common code for most VMX test cases. To use, include this file, + then write a routine named test() that performs a series of calls + to check(). */ + +#include <stdlib.h> +#include <stdio.h> +#include <altivec.h> + +static int failed; +static void test (void); + +static void +check (int result, const char *name) +{ + if (!result) + { + failed++; + printf ("fail %s\n", name); + } +} + +int +main (void) +{ + test (); + if (failed) + abort (); + + return 0; +} |