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-pr42142.c
blob
a4ea16d142cfb0c812111cce062c0d8db86881cb
1
/*
2
pr42142.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
int
12
sort
(
int
L
)
13
{
14
int
end
[
2
] = {
10
,
10
, },
i
=
0
,
R
;
15
while
(
i
<
2
)
16
{
17
R
=
end
[
i
];
18
if
(
L
<
R
)
19
{
20
end
[
i
+
1
] =
1
;
21
end
[
i
] =
10
;
22
++
i
;
23
}
24
else
25
break
;
26
}
27
return
i
;
28
}
29
30
void
31
testTortureExecute
(
void
)
32
{
33
if
(
sort
(
5
) !=
1
)
34
ASSERT
(
0
);
35
return
;
36
}
37