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
* config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
lib-37.c
blob
5a7d533a67024d1a0e7c3de2bbedb8e15f51ec4f
1
/* { dg-do run } */
2
/* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
3
4
#include <string.h>
5
#include <stdlib.h>
6
#include <openacc.h>
7
8
int
9
main
(
int
argc
,
char
**
argv
)
10
{
11
const int
N
=
256
;
12
int
i
;
13
unsigned char
*
h
;
14
void
*
d
;
15
16
h
= (
unsigned char
*)
malloc
(
N
);
17
18
for
(
i
=
0
;
i
<
N
;
i
++)
19
{
20
h
[
i
] =
i
;
21
}
22
23
d
=
acc_present_or_copyin
(
h
,
N
);
24
if
(!
d
)
25
abort
();
26
27
memset
(&
h
[
0
],
0
,
N
);
28
29
acc_copyout
(
h
,
N
);
30
31
for
(
i
=
0
;
i
<
N
;
i
++)
32
{
33
if
(
h
[
i
] !=
i
)
34
abort
();
35
}
36
37
free
(
h
);
38
39
return
0
;
40
}