(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.oacc-c-c++-common/
lib-58.c
       1  /* { dg-do run } */
       2  
       3  #include <stdio.h>
       4  #include <stdlib.h>
       5  #include <openacc.h>
       6  
       7  int
       8  main (int argc, char **argv)
       9  {
      10    const int N = 256;
      11    unsigned char *h;
      12    void *d;
      13  
      14    h = (unsigned char *) malloc (N);
      15  
      16    d = acc_malloc (N);
      17  
      18  #if ACC_MEM_SHARED
      19    fprintf (stderr, "CheCKpOInT\n");
      20  #endif
      21    acc_map_data (h, d, N);
      22  
      23  #if !ACC_MEM_SHARED
      24    fprintf (stderr, "CheCKpOInT\n");
      25  #endif
      26    acc_unmap_data (0);
      27  
      28    acc_free (d);
      29  
      30    free (h);
      31  
      32    return 0;
      33  }
      34  
      35  /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
      36  /* { dg-output "\[^\n\r]* is not a mapped block" { target { ! openacc_host_selected } } } */
      37  /* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
      38  /* { dg-shouldfail "" } */