(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.oacc-c-c++-common/
acc_map_data-host_already-3.c
       1  /* Verify that we refuse 'acc_map_data' when the "host address [...] is already
       2     mapped".  */
       3  
       4  /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
       5  
       6  #include <assert.h>
       7  #include <stdio.h>
       8  #include <openacc.h>
       9  
      10  float global_var;
      11  #pragma acc declare create (global_var)
      12  
      13  int
      14  main ()
      15  {
      16    void *d = acc_malloc (sizeof global_var);
      17    assert (d);
      18    fprintf (stderr, "CheCKpOInT\n");
      19    acc_map_data (&global_var, d, sizeof global_var);
      20  
      21    return 0;
      22  }
      23  
      24  
      25  /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
      26  /* { dg-output "host address \\\[\[0-9a-fA-FxX\]+, \\\+4\\\] is already mapped" } */
      27  /* { dg-shouldfail "" } */