blob: 5c98d847c75198d8df183c7800b10c335514ff1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
func-ptr-1.c from the execute part of the gcc torture tests.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 93 // Using float for double.
#endif
static double f (float a);
static double (*fp) (float a);
void
testTortureExecute (void)
{
#if !defined(__SDCC_hc08) && !defined(__SDCC_s08) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15)
fp = f;
if (fp ((float) 1) != 1.0)
ASSERT (0);
return;
#endif
}
static double
f (float a)
{
return a;
}
|