(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.oacc-c-c++-common/
acc-on-device-2.c
       1  /* Test the acc_on_device library function. */
       2  /* { dg-additional-options "-fno-builtin-acc_on_device" } */
       3  
       4  #include <openacc.h>
       5  
       6  int main ()
       7  {
       8    int dev;
       9    
      10  #pragma acc parallel copyout (dev)
      11    {
      12      dev = acc_on_device (acc_device_not_host);
      13    }
      14  
      15    int expect = 1;
      16    
      17  #if  ACC_DEVICE_TYPE_host
      18    expect = 0;
      19  #endif
      20    
      21    return dev != expect;
      22  }