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
Improve atomic store implementation on hppa-linux.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
declare-4.c
blob
ca48e801314eae2d9925013b85e1b98905275470
1
#include <stdlib.h>
2
#include <openacc.h>
3
4
float
b
;
5
#pragma acc declare create (b)
6
7
#pragma acc routine
8
int
9
func
(
int
a
)
10
{
11
b
=
a
+
1
;
12
13
return
b
;
14
}
15
16
int
17
main
(
int
argc
,
char
**
argv
)
18
{
19
float
a
;
20
21
a
=
2.0
;
22
23
#pragma acc parallel copy (a)
24
{
25
b
=
a
;
26
a
=
1.0
;
27
a
=
a
+
b
;
28
}
29
30
if
(
a
!=
3.0
)
31
abort
();
32
33
a
=
func
(
a
);
34
35
if
(
a
!=
4.0
)
36
abort
();
37
38
return
0
;
39
}