c2eb021fd2
libgomp/ * testsuite/libgomp.oacc-c-c++-common/deep-copy-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-4.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-6.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-7.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-8.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-9.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-11.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-14.c: New test. * testsuite/libgomp.oacc-c++/deep-copy-12.C: New test. * testsuite/libgomp.oacc-c++/deep-copy-13.C: New test. From-SVN: r279629
25 lines
337 B
C
25 lines
337 B
C
#include <stdlib.h>
|
|
#include <assert.h>
|
|
|
|
struct dc
|
|
{
|
|
int a;
|
|
int *b;
|
|
};
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int n = 100, i;
|
|
struct dc v = { .a = 3, .b = (int *) malloc (sizeof (int) * n) };
|
|
|
|
#pragma acc parallel loop copy(v.a, v.b[:n])
|
|
for (i = 0; i < n; i++)
|
|
v.b[i] = v.a;
|
|
|
|
for (i = 0; i < 10; i++)
|
|
assert (v.b[i] == v.a);
|
|
|
|
return 0;
|
|
}
|