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
fortran: Factor the evaluation of MINLOC/MAXLOC's BACK argument
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
pr104952-2.c
blob
7ab4bcdb8af3ebb9fe0f6f71ae3d708e99fe7879
1
#define N 32
2
3
static char
arr
[
N
];
4
5
int
6
main
(
void
)
7
{
8
unsigned int
result
=
2
;
9
10
for
(
unsigned int
i
=
0
;
i
<
N
; ++
i
)
11
arr
[
i
] =
i
+
1
;
12
13
#pragma omp target map(tofrom:result) map(to:arr)
14
#pragma omp simd reduction(&&: result)
15
for
(
unsigned int
i
=
0
;
i
<
N
; ++
i
)
16
result
=
result
&&
arr
[
i
];
17
18
if
(
result
!=
1
)
19
__builtin_abort
();
20
21
return
0
;
22
}