summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-2274.c
blob: d061992d9a8b7964506537232dd00929e94909ef (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
32
33
34
35
36
37
38
39
40
41
/*
  bug-2274.c
*/

#include <testfwk.h>

#pragma disable_warning 84

char func_0 (int i)
{
  return i + 10;
}

char func_1 (char i)
{
  return i + 20;
}

int func_2 (int i)
{
  return i + 30;
}

int func_3 (char i)
{
  return i + 40;
}

void uninitialized (void) __reentrant
{
  /* SDCC should not crash, but only print warning messages. */
  char a = func_0 (a);
  char b = func_1 (b);
  int c = func_2 (c);
  int d = func_3 (d);
}

void testBug (void)
{
  uninitialized ();
}