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
Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
pr104783-2.c
blob
8750d915d01e642d8a43687168ffdc93235d962e
1
#define N (32 * 32)
2
3
#define TYPE float
4
#define VAR v
5
#define INIT 0.0
6
#define UPDATE + 1.0
7
#define EXPECTED N
8
9
int
10
main
(
void
)
11
{
12
TYPE VAR
=
INIT
;
13
#pragma omp target map(tofrom: VAR)
14
#pragma omp parallel for simd
15
for
(
int
i
=
0
;
i
<
N
;
i
++)
16
{
17
#pragma omp atomic update
18
VAR
=
VAR UPDATE
;
19
}
20
21
if
(
VAR
!=
EXPECTED
)
22
__builtin_abort
();
23
24
return
0
;
25
}