struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr68390.c
blob2716570573a9f1a981a0e7e6c0775920cfca1ed8
1 /*
2 pr68390.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma disable_warning 93
9 #endif
11 /* { dg-do run } */
12 /* { dg-options "-O2" } */
14 #ifndef __SDCC_pdk14 // Lack of memory
15 double direct(int x, ...)
17 return x*x;
19 #endif
21 double broken(double (*indirect)(int x, ...), int v)
23 return indirect(v);
26 void
27 testTortureExecute (void)
29 #ifndef __SDCC_pdk14 // Lack of memory
30 double d1;
31 int i = 2;
32 d1 = broken (direct, i);
33 ASSERT (d1 == i*i);
34 return;
35 #endif