struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3235.c
blob5422047a8f43477b9308c676b5128cbb533215c8
1 /*
2 bug-3235.c. A function call was incorrectly considered to be recursive in the peephole optimizer when the name of the callee was a prefix of the caller's name.
3 Required some further conditions, such as register arguments to the callee and tail-call optimization to trigger.
4 */
6 #include <testfwk.h>
8 #ifdef __SDCC
9 #pragma std_c99
10 #endif
12 void
13 func (int a) __z88dk_callee;
15 void
16 func_ (void)
18 func (23);
19 return;
22 int i;
24 void
25 testBug (void)
27 func_();
28 ASSERT (i == 23);
29 return;
32 void
33 func (int a) __z88dk_callee
35 i = a;