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
/
bug3290691.c
blob
f2366169e1d4ffe727c672d5f4e5797aca691e6a
1
/*
2
* bug3290691.c
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_sdcc99
9
#endif
10
11
#include <stdbool.h>
12
13
bool
foo_b
(
bool
b
)
14
{
15
return
!
b
;
16
}
17
18
unsigned char
bar_c
(
unsigned char
c
)
19
{
20
return
foo_b
(
c
);
21
}
22
23
unsigned char
foo_c
(
unsigned char
c
)
24
{
25
return
!
c
;
26
}
27
28
bool
bar_b
(
bool
c
)
29
{
30
return
foo_c
(
c
);
31
}
32
33
void
34
testBug
(
void
)
35
{
36
#ifndef __SDCC_pic16
37
ASSERT
(
bar_c
(
1
) ==
0
);
38
ASSERT
(
bar_c
(
0
) ==
1
);
39
ASSERT
(
bar_b
(
1
) ==
0
);
40
ASSERT
(
bar_b
(
0
) ==
1
);
41
#endif
42
}