repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
combined-reduction.c
blob
b5ce4ed7b3d46fb951f44d472b7bd6e2050f3abd
1
/* Test a combined acc parallel loop reduction. */
2
3
/* { dg-do run } */
4
5
#include <assert.h>
6
7
int
8
main
()
9
{
10
int
i
,
v1
=
0
,
v2
=
0
,
n
=
100
;
11
12
#pragma acc parallel loop reduction(+:v1, v2)
13
for
(
i
=
0
;
i
<
n
;
i
++)
14
{
15
v1
++;
16
v2
++;
17
}
18
19
assert
(
v1
==
n
);
20
assert
(
v2
==
n
);
21
22
return
0
;
23
}