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
* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
lib-12.c
blob
b46f59028b7cba39560e5d12989b26ba24464b7a
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
15
h
= (
unsigned char
*)
malloc
(
N
);
16
17
for
(
i
=
0
;
i
<
N
;
i
++)
18
{
19
h
[
i
] =
i
;
20
}
21
22
(
void
)
acc_copyin
(
h
,
N
);
23
24
memset
(
h
,
0
,
N
);
25
26
acc_copyout
(
h
,
N
);
27
28
for
(
i
=
0
;
i
<
N
;
i
++)
29
{
30
if
(
h
[
i
] !=
i
)
31
abort
();
32
}
33
34
free
(
h
);
35
36
return
0
;
37
}