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-loop-3b.c
blob
7ce2808e0a061f4ad8aaf1203354eb79e42e6341
1
/*
2
loop-3b.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
#pragma disable_warning 85
10
#endif
11
12
#include <limits.h>
13
14
int
n
=
0
;
15
16
void
g
(
int
i
)
17
{
18
n
++;
19
}
20
21
void
f
(
int
m
)
22
{
23
int
i
;
24
i
=
m
;
25
do
26
{
27
g
(
i
*
4
);
28
i
-=
INT_MAX
/
8
;
29
}
30
while
(
i
>
0
);
31
}
32
33
void
34
testTortureExecute
(
void
)
35
{
36
f
(
INT_MAX
/
8
*
4
);
37
if
(
n
!=
4
)
38
ASSERT
(
0
);
39
return
;
40
}