Commit 89d92678 by Kai Tietz Committed by Kai Tietz

func-indirect.c: New.

2008-11-26  Kai Tietz  <kai.tietz@onevision.com>

        * gcc.dg/callabi/func-indirect.c: New.

From-SVN: r142214
parent 3dc21182
2008-11-26 Kai Tietz <kai.tietz@onevision.com>
* gcc.dg/callabi/func-indirect.c: New.
2008-11-25 Jason Merrill <jason@redhat.com>
PR c++/28743
......
/* Test for cross x86_64<->w64 abi standard calls via variable.
*/
/* Origin: Kai Tietz <kai.tietz@onevision.com> */
/* { dg-do run { target { x86_64-*-* } } } */
/* { 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();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment