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
/
gcc-torture-execute-pr78559.c
blob
1a65114257ea652c752fa69df935326cf5cb61c2
1
/*
2
pr78559.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
/* PR rtl-optimization/78559 */
12
13
int
g
=
20
;
14
int
d
=
0
;
15
16
short
17
fn2
(
int
p1
,
int
p2
)
18
{
19
return
p2
>=
2
||
5
>>
p2
?
p1
:
p1
<<
p2
;
20
}
21
22
void
23
testTortureExecute
(
void
)
24
{
25
int
result
=
0
;
26
lbl_2582
:
27
if
(
g
)
28
{
29
for
(
int
c
= -
3
;
c
;
c
++)
30
result
=
fn2
(
1
,
g
);
31
}
32
else
33
{
34
for
(
int
i
=
0
;
i
<
2
;
i
+=
2
)
35
if
(
d
)
36
goto
lbl_2582
;
37
}
38
if
(
result
!=
1
)
39
ASSERT
(
0
);
40
return
;
41
}
42
43
44