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
gpu_group.c: compute_size_in_direction: drop unused variable
[ppcg.git]
/
tests
/
shared_sink.c
blob
ae3fac2fc1e93b0ad40f9e4b5a6547457b2bfa8c
1
#include <stdlib.h>
2
3
/* Check that the sources of live ranges with the same sink
4
* are executed in order.
5
*/
6
int
main
()
7
{
8
int
A
[
128
];
9
int
n
=
128
;
10
11
A
[
0
] =
0
;
12
#pragma scop
13
for
(
int
i
=
0
;
i
<
n
; ++
i
) {
14
int
set
=
0
;
15
if
(
A
[
i
] <
2
)
16
set
=
1
;
17
if
(
set
)
18
A
[
i
] =
2
;
19
}
20
#pragma endscop
21
if
(
A
[
0
] !=
2
)
22
return
EXIT_FAILURE
;
23
24
return
EXIT_SUCCESS
;
25
}