| 1 |
/* Test for cross x86_64<->w64 abi standard calls via variable. |
| 2 |
*/ |
| 3 |
/* Origin: Kai Tietz <[email protected]> */ |
| 4 |
/* { dg-do run } */ |
| 5 |
/* { dg-options "-std=gnu99 -ffast-math" } */ |
| 6 |
#include "callabi.h" |
| 7 |
|
| 8 |
extern void abort (void); |
| 9 |
|
| 10 |
typedef int (CALLABI_CROSS *func)(void *, char *, char *, short, long long); |
| 11 |
|
| 12 |
int CALLABI_CROSS |
| 13 |
callback(void * ptr, char *string1, char *string2, short number, long long rand) |
| 14 |
{ |
| 15 |
return (rand != 0x1234567890abcdefLL); |
| 16 |
} |
| 17 |
|
| 18 |
int main() |
| 19 |
{ |
| 20 |
volatile func callme = callback; |
| 21 |
if(callme(0, 0, 0, 0, 0x1234567890abcdefLL)) |
| 22 |
abort(); |
| 23 |
return 0; |
| 24 |
} |