summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx/harness.h
blob: faea3e97dba9d3fcadd4efc0e1fc208f84c572ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
}