OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [x86_64/] [abi/] [callabi/] [func-indirect.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test for cross x86_64<->w64 abi standard calls via variable.
2
*/
3
/* Origin: Kai Tietz <kai.tietz@onevision.com> */
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.