Debian Codegraph @

gcc/testsuite/gcc.dg/vmx/harness.h

raw
1 /* Common code for most VMX test cases. To use, include this file,
2 then write a routine named test() that performs a series of calls
3 to check(). */
4
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <altivec.h>
8
9 static int failed;
10 static void test (void);
11
12 static void
13 check (int result, const char *name)
14 {
15 if (!result)
16 {
17 failed++;
18 printf ("fail %s\n", name);
19 }
20 }
21
22 int
23 main (void)
24 {
25 test ();
26 if (failed)
27 abort ();
28
29 return 0;
30 }