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
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-pr78617.c
blob
783bbf52556567f3f38b1020a568e440ffc2f3e8
1
/*
2
pr78617.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
int
a
=
0
;
12
int
d
=
1
;
13
int
f
=
1
;
14
15
int
fn1
() {
16
return
a
||
1
>>
a
;
17
}
18
19
int
fn2
(
int
p1
,
int
p2
) {
20
return
p2
>=
2
?
p1
:
p1
>>
1
;
21
}
22
23
int
fn3
(
int
p1
) {
24
return
d
^
p1
;
25
}
26
27
int
fn4
(
int
p1
,
int
p2
) {
28
return
fn3
(!
d
>
fn2
((
f
=
fn1
() -
1000
) ||
p2
,
p1
));
29
}
30
31
void
32
testTortureExecute
(
void
) {
33
if
(
fn4
(
0
,
0
) !=
1
)
34
ASSERT
(
0
);
35
return
;
36
}