struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3040.c.in
blob0c9d10e731bd111d6c500195fd872a04c59c0d33
1 /* bug 3040
2 crash in pdk code generation when both operands of an additive operator are block-scope static const int.
3 type: char, signed char, unsigned char, signed int, unsigned int, signed long, unsigned long, signed long long, unsigned long long
4 */
5 #include <testfwk.h>
7 {type} f(void)
9 static const {type} a;
10 static const {type} b;
11 return a + b;
14 {type} g(void)
16 static const {type} a;
17 static const {type} b;
18 return a - b;
21 void testBug(void)
23 ASSERT(!f());