summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c
blob: 1a9fccd97f6a2f8194f3d205d39e8a13e6c32ee5 (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
/* Test for cross x86_64<->w64 abi standard calls via variable.  */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */

typedef int (*func)(void *, char *, char *, short, long long);

static int
callback (void *ptr, char *string1, char *string2, short number,
	  long long rand)
{
  if (ptr != 0
      || string1 != 0
      || string2 != 0
      || number != 0x1234
      || rand != 0x1234567890abcdefLL)
    return 1;
  else
    return 0;
}

func
get_callback (void)
{
  return callback;
}