(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.oacc-c-c++-common/
kernels-alias-ipa-pta-2.c
       1  /* { dg-additional-options "-fipa-pta" } */
       2  
       3  #include <stdlib.h>
       4  
       5  #define N 2
       6  
       7  int
       8  main (void)
       9  {
      10    unsigned int *a = (unsigned int *)malloc (N * sizeof (unsigned int));
      11    unsigned int *b = (unsigned int *)malloc (N * sizeof (unsigned int));
      12    unsigned int *c = (unsigned int *)malloc (N * sizeof (unsigned int));
      13  
      14  #pragma acc kernels pcopyout (a[0:N], b[0:N], c[0:N])
      15    {
      16      a[0] = 0;
      17      b[0] = 1;
      18      c[0] = a[0];
      19    }
      20  
      21    if (a[0] != 0 || b[0] != 1 || c[0] != 0)
      22      abort ();
      23  
      24    free (a);
      25    free (b);
      26    free (c);
      27  }