struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2347.c
blob55e852b6c5ab71ea72e61790844eb1e542422796
1 /* bug-2347.c
2 An bug in marking rematerializeable variables
3 */
5 #include <testfwk.h>
7 #include <string.h>
9 const unsigned char star_star_filename[] = { '*', '.', '*', 0xff };
11 void
12 dos_catalog(const char *filename)
14 char filename_copy[10];
15 int len = 10;
17 if (filename == NULL)
18 filename = star_star_filename;
20 len = strlen(filename);
22 memcpy(filename_copy, filename, len); // This memcpy() always used star_star_filename as source.
24 ASSERT(filename_copy[0] == 'X');
27 void testBug(void)
29 dos_catalog("X");