1 /* { dg-skip-if "" { *-*-* } { "-DACC_MEM_SHARED=1" } } */
10 main (int argc
, char *argv
[])
12 char *block1
= (char *) malloc (SIZE
);
13 char *block2
= (char *) malloc (SIZE
);
16 acc_copyin (block1
, SIZE
);
17 acc_copyin (block2
, SIZE
);
19 #pragma acc enter data copyin(block1[0:SIZE], block2[0:SIZE])
22 #pragma acc data copy(block1[0:SIZE], block2[0:SIZE])
25 acc_copyout (block1
, SIZE
);
26 acc_copyout (block2
, SIZE
);
28 #pragma acc exit data copyout(block1[0:SIZE], block2[0:SIZE])
30 /* These should stay present until the end of the structured data
32 assert (acc_is_present (block1
, SIZE
));
33 assert (acc_is_present (block2
, SIZE
));
36 assert (!acc_is_present (block1
, SIZE
));
37 assert (!acc_is_present (block2
, SIZE
));