blob: 448662985dcd2cd0c74623e1ccd7b3bcafd76b8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
bug-3249.c. A check for the possibility of tail-call optimization in codegen assumed that code is generated for a function (as opposed to initialization of file-scope objects),
resulting in a segfault when initializing file-scope static objects in non-intrinsic named address spaces from the Embedded C standard.
*/
#include <testfwk.h>
volatile char tmp;
void set_RAM_bank1(void) { tmp = 1; }
#if defined(__SDCC_mcs51)
#define DATA
#elif !defined(PORT_HOST)
__addressmod set_RAM_bank1 DATA;
#else
#define DATA
#endif
DATA int addendum1_ram = 2;
void
testBug (void)
{
ASSERT (addendum1_ram == 2);
}
|