Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug-2461.c
blob80663e767442895952e6c4efd590839fb4f972a9
1 /*
2 bug-2461.c
3 */
5 #include <testfwk.h>
7 char foo (const char *p)
9 return p[0];
12 int i = 0;
14 void testBug (void)
16 char c[] = "1234";
17 ASSERT (foo (i ? (const char *) c : "test") == 't');
18 i = 1;
19 ASSERT (foo (i ? (const char *) c : "test") == '1');