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-pr24141.c
blob
a36e66e4df7477c46d1ce311c332643050d2fdc3
1
/*
2
pr24141.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
// reduced testcase, compile with -O2. Also, with --disable-checking
12
// gcc produces wrong code.
13
14
int
i
;
15
16
void
g
(
void
)
17
{
18
i
=
1
;
19
}
20
21
void
f
(
int
a
,
int
b
)
22
{
23
int
c
=
0
;
24
if
(
a
==
0
)
25
c
=
1
;
26
if
(
c
)
27
return
;
28
if
(
c
==
1
)
29
c
=
0
;
30
if
(
b
==
0
)
31
c
=
1
;
32
if
(
c
)
33
g
();
34
}
35
36
void
37
testTortureExecute
(
void
)
38
{
39
f
(
1
,
0
);
40
if
(
i
!=
1
)
41
ASSERT
(
0
);
42
return
;
43
}
44