struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-func-ptr-1.c
blobb7211792908b9624a943105ab82f6e58ce9e812d
1 /*
2 func-ptr-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 93 // Using float for double.
10 #endif
12 static double f (float a);
13 static double (*fp) (float a);
15 void
16 testTortureExecute (void)
18 #if !defined(__SDCC_hc08) && !defined(__SDCC_s08) && !defined(__SDCC_mos6502) && !defined(__SDCC_mos65c02) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15)
19 fp = f;
20 if (fp ((float) 1) != 1.0)
21 ASSERT (0);
22 return;
23 #endif
26 static double
27 f (float a)
29 return a;