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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [x86_64/] [abi/] [callabi/] [func-indirect.c] - Rev 859

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

/* Test for cross x86_64<->w64 abi standard calls via variable.
*/
/* Origin: Kai Tietz <kai.tietz@onevision.com> */
/* { dg-do run } */
/* { dg-options "-std=gnu99 -ffast-math" } */
#include "callabi.h"
 
extern void abort (void);
 
typedef int (CALLABI_CROSS *func)(void *, char *, char *, short, long long);
 
int CALLABI_CROSS
callback(void * ptr, char *string1, char *string2, short number, long long rand)
{
    return (rand != 0x1234567890abcdefLL);
}
 
int main()
{
    volatile func callme = callback;
    if(callme(0, 0, 0, 0, 0x1234567890abcdefLL))
     abort();
    return 0;
}
 

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

powered by: WebSVN 2.1.0

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