summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
blob: 730b8db9c1f9c0baa9540d5a541dc8811289e9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Test for cross x86_64<->w64 abi standard calls via variable.  */
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
/* { dg-additional-sources "func-indirect-2b.c" } */

extern void __attribute__ ((sysv_abi)) abort (void);
typedef int (*func)(void *, char *, char *, short, long long);
extern func get_callback (void);

int __attribute__ ((sysv_abi))
main ()
{
  func callme = get_callback ();
  if (callme (0, 0, 0, 0x1234, 0x1234567890abcdefLL))
    abort ();
  return 0;
}