struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3215.c
blob862d825bdfecd4f7330708f4b5f4efde324969d5
1 /*
2 bug-3215.c
3 A bug in merging sequences of puts
4 */
6 #include <testfwk.h>
8 #pragma disable_warning 283
10 #include <stdio.h>
12 void foo(void);
14 int
15 bug ()
17 puts ("1");
18 puts ("2");
20 foo();
22 // Second sequence used same string as first one.
23 puts ("4");
24 puts ("5");
25 return 0;
28 #ifndef PORT_HOST
29 int putchar (int c)
31 static int i;
32 ASSERT (c == "1\n2\n4\n5\n"[i++]);
34 #endif
36 void foo(void)
40 void
41 testBug(void)
43 bug ();