2 /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
11 main (int argc
, char **argv
)
17 a
= (float *) malloc (N
* sizeof (float));
18 b
= (float *) malloc (N
* sizeof (float));
19 c
= (float *) malloc (N
* sizeof (float));
21 for (i
= 0; i
< N
; i
++)
27 d
= (float *) acc_malloc (N
* sizeof (float));
28 acc_map_data (c
, d
, N
* sizeof (float));
30 #pragma acc parallel copyin (a[0:N]) present_or_create (c[0:N+1]) copyout (b[0:N])
34 for (ii
= 0; ii
< N
; ii
++)
41 for (i
= 0; i
< N
; i
++)
50 if (acc_is_present (a
, (N
* sizeof (float))))
53 if (acc_is_present (b
, (N
* sizeof (float))))
56 if (!acc_is_present (c
, (N
* sizeof (float))))
59 d
= (float *) acc_deviceptr (c
);
67 /* { dg-shouldfail "libgomp: \[\h+,\d+\] is not mapped" } */