Fix type compatibility for types with flexible array member 2/2 [PR113688,PR114713...
[gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-53.c
blobd452a694750201668ed7c05b50f6182402e6e70d
1 /* Exercise acc_map_data with a NULL data mapping. */
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <openacc.h>
7 int
8 main (int argc, char **argv)
10 const int N = 256;
11 unsigned char *h;
12 void *d;
14 h = (unsigned char *) malloc (N);
16 d = acc_malloc (N);
18 fprintf (stderr, "CheCKpOInT\n");
19 acc_map_data (h, 0, N);
21 acc_unmap_data (h);
23 acc_free (d);
25 free (h);
27 return 0;
30 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
31 /* { dg-output "\\\[\[0-9a-fA-FxX\]+,\\\+256\]->\\\[\[^\n\r]*,\\\+256\\\] is a bad map" { target { ! openacc_host_selected } } } */
32 /* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
33 /* { dg-shouldfail "" } */