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-20051021-1.c
blob
8e7882f8751402e38937962040754f4b26140972
1
/*
2
20051021-1.c from the execute part of the gcc torture suite.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
/* Verify that TRUTH_AND_EXPR is not wrongly changed to TRUTH_ANDIF_EXPR. */
12
13
int
count
=
0
;
14
15
int
foo1
(
void
)
16
{
17
count
++;
18
return
0
;
19
}
20
21
int
foo2
(
void
)
22
{
23
count
++;
24
return
0
;
25
}
26
27
void
testTortureExecute
(
void
)
28
{
29
if
((
foo1
() ==
1
) & (
foo2
() ==
1
))
30
ASSERT
(
0
);
31
32
if
(
count
!=
2
)
33
ASSERT
(
0
);
34
35
return
;
36
}