repo.or.cz
/
ppcg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
update pet for preserving array extents in case of empty context
[ppcg.git]
/
tests
/
call5.c
blob
30c3fac3c5a1339c7dbc2d95bb65b628852b61e0
1
#include <stdlib.h>
2
3
int
inline
add_one
(
int
i
)
4
{
5
return
i
+
1
;
6
}
7
8
int
main
()
9
{
10
int
a
[
1000
],
b
[
1000
];
11
12
for
(
int
i
=
0
;
i
<
1000
; ++
i
)
13
a
[
i
] =
i
;
14
#pragma scop
15
for
(
int
i
=
0
;
i
<
999
; ++
i
)
16
b
[
i
] =
add_one
(
add_one
(
a
[
i
]));
17
#pragma endscop
18
for
(
int
i
=
0
;
i
<
999
; ++
i
)
19
if
(
b
[
i
] !=
a
[
i
] +
2
)
20
return
EXIT_FAILURE
;
21
22
return
EXIT_SUCCESS
;
23
}