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
/
bug-2715.c
blob
3bdf7b1ddd3842177b999afe84ca8da2ffbe10e9
1
/*
2
bug-2715.c
3
*/
4
5
#include <testfwk.h>
6
7
#pragma disable_warning 85
8
9
struct
foo
;
10
typedef
struct
foo
FILE
;
11
12
void
pc
(
FILE
*
fp
,
char
c
)
13
{
14
}
15
16
void
pd
(
FILE
*
fp
,
int
n
)
17
{
18
int
c
;
19
20
c
=
n
%
10
+
'0'
;
// This addition has operands smaller than the result, resulting in a crash in the z80 backend.
21
if
(
n
!=
0
)
22
pd
(
fp
,
n
);
23
pc
(
fp
,
c
);
24
}
25
26
void
testBug
(
void
)
27
{
28
pd
(
0
,
0
);
29
}
30