(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
gomp/
omp-parallel-if.c
       1  /* { dg-do compile } */
       2  
       3  extern int foo(void);
       4  extern void bar(void);
       5  
       6  int main ()
       7  {
       8    /* Malformed uses of 'if' and 'num_threads'.  */
       9    #pragma omp parallel if (foo () > 10) if (foo () == 3) /* { dg-error "too many" } */
      10      {
      11        bar ();
      12      }
      13  
      14    #pragma omp parallel num_threads (3) num_threads (20)	/* { dg-error "too many" } */
      15      {
      16        bar ();
      17      }
      18  
      19    /* Valid uses of 'if' and 'num_threads'.  */
      20    #pragma omp parallel if (foo () == 10) num_threads (foo ())
      21      {
      22        bar ();
      23      }
      24  }