struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-1699804.c
blob7c2b0045b8e6eec2c063ae5fdbbd204eda4cca8f
1 /*
2 bug-1699804.c
3 */
5 #include <testfwk.h>
7 static __code const char Str_global[] = "Hello1";
8 char s1, s2;
10 void
11 testFoo (void)
13 static __code const char str_local[] = "Hello2";
15 static char str1[sizeof (Str_global)];
16 static char str2[sizeof (str_local)]; // causes error 20: Undefined identifier 'str_local'
18 s1 = sizeof (Str_global);
19 s2 = sizeof (str_local); // no error and proper result when line causing error (above) is removed
21 ASSERT (s1 == 7);
22 ASSERT (s2 == 7);