1  /* PR middle-end/99928 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-fopenmp -fdump-tree-gimple" } */
       4  
       5  int r00, r01, r02;
       6  
       7  void
       8  bar (void)
       9  {
      10    /* { dg-final { scan-tree-dump-not "omp master\[^\n\r]*in_reduction\\(\\+:r00\\)" "gimple" } } */
      11    /* { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*in_reduction\\(\\+:r00\\)" "gimple" } } */
      12    #pragma omp master taskloop in_reduction(+:r00)
      13    for (int i = 0; i < 64; i++)
      14      r00++;
      15    /* { dg-final { scan-tree-dump-not "omp master\[^\n\r]*in_reduction\\(\\+:r01\\)" "gimple" } } */
      16    /* { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*in_reduction\\(\\+:r01\\)" "gimple" } } */
      17    /* { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*in_reduction\\(\\+:r01\\)" "gimple" } } */
      18    #pragma omp master taskloop simd in_reduction(+:r01)
      19    for (int i = 0; i < 64; i++)
      20      r01++;
      21    /* { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*in_reduction\\(\\+:r02\\)" "gimple" } } */
      22    /* { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*in_reduction\\(\\+:r02\\)" "gimple" } } */
      23    #pragma omp taskloop simd in_reduction(+:r02)
      24    for (int i = 0; i < 64; i++)
      25      r02++;
      26    /* FIXME: We don't support in_reduction clause on target yet, once we do, should
      27       add testcase coverage for all combined/composite constructs with target as leaf construct.  */
      28  }