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
Add support for ARMv8-R architecture
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
reduction-initial-1.c
blob
9991db07013bfb554e1beac14b109565fc12e71e
1
/* { dg-do run } */
2
3
int
4
main
(
void
)
5
{
6
#define I 5
7
#define N 32
8
#define A 8
9
10
int
a
=
A
;
11
int
s
=
I
;
12
13
#pragma acc parallel vector_length(N) copy(s)
14
{
15
int
i
;
16
#pragma acc loop reduction(+:s)
17
for
(
i
=
0
;
i
<
N
; ++
i
)
18
s
+=
a
;
19
}
20
21
if
(
s
!=
I
+
N
*
A
)
22
__builtin_abort
();
23
24
return
0
;
25
}