(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.oacc-c-c++-common/
vprop.c
       1  /* { dg-do run } */
       2  
       3  #include <assert.h>
       4  
       5  #define test(type)				\
       6  void						\
       7  test_##type ()					\
       8  {						\
       9    signed type b[100];				\
      10    signed type i, j, x = -1, y = -1;		\
      11  						\
      12    _Pragma("acc parallel loop copyout (b)")	\
      13    for (j = 0; j > -5; j--)			\
      14      {						\
      15        type c = x+y;                             \
      16        _Pragma("acc loop vector")		\
      17        for (i = 0; i < 20; i++)			\
      18  	b[-j*20 + i] = c;			\
      19        b[5-j] = c;                               \
      20      }						\
      21  						\
      22    for (i = 0; i < 100; i++)			\
      23      assert (b[i] == -2);			\
      24  }
      25  
      26  test(char)
      27  test(short)
      28  
      29  int
      30  main ()
      31  {
      32    test_char ();
      33    test_short ();
      34  
      35    return 0;
      36  }