struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3465.c
blobb5e61bdbbb6d2fcdfdf2e2fbe0c59081e30e745c
1 /* bug-3465.c
2 Symbols for previous parameters were not available for the array dimension of a parameter.
3 */
5 #include <testfwk.h>
6 #include <string.h>
8 #pragma disable_warning 85
10 void f(unsigned int j, char d[sizeof(j)])
12 unsigned int k;
13 memcpy (d, &j, sizeof(j));
16 void
17 testBug(void)
19 unsigned int j = 0xaa55;
20 char d[sizeof(j)];
21 f(j, d);
22 ASSERT(!memcmp(&j, d, sizeof(j)));