(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.c-c++-common/
for-5.c
       1  /* { dg-additional-options "-std=gnu99" { target c } } */
       2  
       3  extern
       4  #ifdef __cplusplus
       5  "C"
       6  #endif
       7  void abort ();
       8  
       9  #define M(x, y, z) O(x, y, z)
      10  #define O(x, y, z) x ## _ ## y ## _ ## z
      11  
      12  #pragma omp declare target
      13  
      14  #define F for
      15  #define G f
      16  #define S
      17  #define N(x) M(x, G, normal)
      18  #include "for-2.h"
      19  #undef S
      20  #undef N
      21  #undef F
      22  #undef G
      23  
      24  #pragma omp end declare target
      25  
      26  #undef OMPFROM
      27  #undef OMPTO
      28  #define DO_PRAGMA(x) _Pragma (#x)
      29  #define OMPFROM(v) DO_PRAGMA (omp target update from(v))
      30  #define OMPTO(v) DO_PRAGMA (omp target update to(v))
      31  
      32  #define F target parallel for
      33  #define G tpf
      34  #include "for-1.h"
      35  #undef F
      36  #undef G
      37  
      38  #define F target simd
      39  #define G t_simd
      40  #define S
      41  #define N(x) M(x, G, normal)
      42  #include "for-2.h"
      43  #undef S
      44  #undef N
      45  #undef F
      46  #undef G
      47  
      48  #define F target parallel for simd
      49  #define G tpf_simd
      50  #include "for-1.h"
      51  #undef F
      52  #undef G
      53  
      54  #define F target teams distribute
      55  #define G ttd
      56  #define S
      57  #define N(x) M(x, G, normal)
      58  #include "for-2.h"
      59  #undef S
      60  #undef N
      61  #undef F
      62  #undef G
      63  
      64  #define F target teams distribute
      65  #define G ttd_ds128
      66  #define S dist_schedule(static, 128)
      67  #define N(x) M(x, G, normal)
      68  #include "for-2.h"
      69  #undef S
      70  #undef N
      71  #undef F
      72  #undef G
      73  
      74  #define F target teams distribute simd
      75  #define G ttds
      76  #define S
      77  #define N(x) M(x, G, normal)
      78  #include "for-2.h"
      79  #undef S
      80  #undef N
      81  #undef F
      82  #undef G
      83  
      84  #define F target teams distribute simd
      85  #define G ttds_ds128
      86  #define S dist_schedule(static, 128)
      87  #define N(x) M(x, G, normal)
      88  #include "for-2.h"
      89  #undef S
      90  #undef N
      91  #undef F
      92  #undef G
      93  
      94  #define F target teams distribute parallel for
      95  #define G ttdpf
      96  #include "for-1.h"
      97  #undef F
      98  #undef G
      99  
     100  #define F target teams distribute parallel for dist_schedule(static, 128)
     101  #define G ttdpf_ds128
     102  #include "for-1.h"
     103  #undef F
     104  #undef G
     105  
     106  #define F target teams distribute parallel for simd
     107  #define G ttdpfs
     108  #include "for-1.h"
     109  #undef F
     110  #undef G
     111  
     112  #define F target teams distribute parallel for simd dist_schedule(static, 128)
     113  #define G ttdpfs_ds128
     114  #include "for-1.h"
     115  #undef F
     116  #undef G
     117  
     118  int
     119  main ()
     120  {
     121    if (test_tpf_static ()
     122        || test_tpf_static32 ()
     123        || test_tpf_auto ()
     124        || test_tpf_guided32 ()
     125        || test_tpf_runtime ()
     126        || test_t_simd_normal ()
     127        || test_tpf_simd_static ()
     128        || test_tpf_simd_static32 ()
     129        || test_tpf_simd_auto ()
     130        || test_tpf_simd_guided32 ()
     131        || test_tpf_simd_runtime ()
     132        || test_ttd_normal ()
     133        || test_ttd_ds128_normal ()
     134        || test_ttds_normal ()
     135        || test_ttds_ds128_normal ()
     136        || test_ttdpf_static ()
     137        || test_ttdpf_static32 ()
     138        || test_ttdpf_auto ()
     139        || test_ttdpf_guided32 ()
     140        || test_ttdpf_runtime ()
     141        || test_ttdpf_ds128_static ()
     142        || test_ttdpf_ds128_static32 ()
     143        || test_ttdpf_ds128_auto ()
     144        || test_ttdpf_ds128_guided32 ()
     145        || test_ttdpf_ds128_runtime ()
     146        || test_ttdpfs_static ()
     147        || test_ttdpfs_static32 ()
     148        || test_ttdpfs_auto ()
     149        || test_ttdpfs_guided32 ()
     150        || test_ttdpfs_runtime ()
     151        || test_ttdpfs_ds128_static ()
     152        || test_ttdpfs_ds128_static32 ()
     153        || test_ttdpfs_ds128_auto ()
     154        || test_ttdpfs_ds128_guided32 ()
     155        || test_ttdpfs_ds128_runtime ())
     156      abort ();
     157    return 0;
     158  }