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-loop-3.c
blob
2a59634a5ba64c7ad0f461d074a3d9ebb2524841
1
/*
2
loop-3.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
*
INT_MAX
/
2
);
28
}
29
while
(--
i
>
0
);
30
}
31
32
void
33
testTortureExecute
(
void
)
34
{
35
f
(
4
);
36
if
(
n
!=
4
)
37
ASSERT
(
0
);
38
return
;
39
}
40