repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug3475990.c
blob
52e50fc576cd8754b600385159ac351a8e6817d5
1
/* Due to the specific structure of the control-flow graph there was a segmentation fault in iCode generatuion. */
2
3
#include <testfwk.h>
4
5
void
set_b
(
void
)
6
{
7
}
8
9
#if defined(__SDCC) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15)
// Weird issue in pdk14 / pdk15
10
__addressmod set_b b
;
11
#else
12
#define b
13
#endif
14
15
int
a0
,
a1
,
a2
;
16
b
int
b0
;
17
int
b2
,
b1
;
18
int
x0
,
x1
;
19
20
int
f
(
void
)
21
{
22
switch
(
x0
)
23
{
24
case
0
:
25
if
(
a0
&&
b0
)
26
{
27
}
28
else
29
{
30
x0
++;
31
}
32
return
(
b2
);
33
default
:
34
return
(
x1
);
35
}
36
return
(
a2
);
37
}
38
39
void
testBug
(
void
)
40
{
41
}
42