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
PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
lib-25.c
blob
9b42dee9d8721da0d89dc1c5356ad0feff4f91cd
1
/* Exercise acc_create and acc_delete. */
2
3
#include <stdlib.h>
4
#include <openacc.h>
5
6
int
7
main
(
int
argc
,
char
**
argv
)
8
{
9
const int
N
=
256
;
10
unsigned char
*
h
;
11
void
*
d
;
12
13
h
= (
unsigned char
*)
malloc
(
N
);
14
15
d
=
acc_create
(
h
,
N
);
16
if
(!
d
)
17
abort
();
18
19
d
=
acc_create
(
h
,
N
);
20
if
(!
d
)
21
abort
();
22
23
acc_delete
(
h
,
N
);
24
25
if
(!
acc_is_present
(
h
,
N
))
26
abort
();
27
28
acc_delete
(
h
,
N
);
29
30
#if !ACC_MEM_SHARED
31
if
(
acc_is_present
(
h
,
N
))
32
abort
();
33
#endif
34
35
free
(
h
);
36
37
return
0
;
38
}