struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1670148.c
blob80f1442ae668e0466c7421f84c40ef43c28723c6
1 /*
2 bug 1670148.c
3 */
5 #include <testfwk.h>
7 // no need to call this, it generates compiler error for xstack-auto
8 // error 9: FATAL Compiler Internal Error
9 struct str {
10 long aa;
11 long bb;
14 struct str *v1;
16 void foo(void)
18 struct str v2;
19 struct str loc;
21 v2.aa = 0;
22 loc.bb = v1->bb;
23 loc.aa = v1->aa - v2.aa;
25 loc.bb += 0;
28 void
29 testBug(void)
31 ASSERT(1);