(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
gomp/
reduction-2.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-fopenmp" } */
       3  
       4  struct S {};
       5  void foo (void *, void *);
       6  void bar (void *, void *);
       7  void baz (void *);
       8  #pragma omp declare reduction(+:struct S:foo (&omp_out, &omp_in))initializer(bar(&omp_priv, &omp_orig))
       9  
      10  void
      11  test1 (void)
      12  {
      13    struct S s;
      14    int i;
      15    #pragma omp parallel reduction(+:s)
      16      baz (&s);
      17    #pragma omp parallel reduction(task, +:s)	/* { dg-error "zero sized type 'struct S' in 'reduction' clause" } */
      18      baz (&s);
      19    #pragma omp taskloop reduction(+:s)		/* { dg-error "zero sized type 'struct S' in 'reduction' clause" } */
      20    for (i = 0; i < 1; i++)
      21      baz (&s);
      22    #pragma omp taskloop simd reduction(+:s)	/* { dg-error "zero sized type 'struct S' in 'reduction' clause" } */
      23    for (i = 0; i < 1; i++)
      24      baz (&s);
      25    #pragma omp taskgroup task_reduction(+:s)	/* { dg-error "zero sized type 'struct S' in 'task_reduction' clause" } */
      26    {
      27      #pragma omp task in_reduction(+:s)		/* { dg-error "zero sized type 'struct S' in 'in_reduction' clause" } */
      28      baz (&s);
      29    }
      30  }