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
/
declare-vla.c
blob
3ea148ed40db2449da0a18e8d653818d7e1cb992
1
/* Verify that acc declare accept VLA variables. */
2
3
#include <assert.h>
4
5
int
6
main
()
7
{
8
int
N
=
1000
;
9
int
i
,
A
[
N
];
10
#pragma acc declare copy(A)
11
12
for
(
i
=
0
;
i
<
N
;
i
++)
13
A
[
i
] = -
i
;
14
15
#pragma acc kernels
16
for
(
i
=
0
;
i
<
N
;
i
++)
17
A
[
i
] =
i
;
18
19
#pragma acc update host(A)
20
21
for
(
i
=
0
;
i
<
N
;
i
++)
22
assert
(
A
[
i
] ==
i
);
23
24
return
0
;
25
}