summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug1565152.c
blob: 040bc7d40e00eebf4612932aa093d9a64ae747ac (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
28
29
30
31
/*
    bug 1565152.c
*/

#include <testfwk.h>

// no need to call this, it generates compiler error for xstack-auto
//   error 9: FATAL Compiler Internal Error

#if defined(__SDCC_mcs51)
#include <8051.h>

unsigned int foo(void)
{
	unsigned int i,j;
	unsigned long l=0;

	for (i=0;i<10;i++)
	{
		j=SP; // any SFR would do to generate crash
		l+=j; 
	} 
	return 1; // <- it gives error on this line
}
#endif

void
testBug(void)
{
	ASSERT(1);
}