(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.c-c++-common/
thread-limit-1.c
       1  #include <omp.h>
       2  #include <stdlib.h>
       3  
       4  void
       5  foo ()
       6  {
       7    {
       8      #pragma omp target parallel nowait thread_limit (4) num_threads (1)
       9      if (omp_get_thread_limit () > 4)
      10        abort ();
      11    }
      12    #pragma omp taskwait
      13  }
      14  
      15  int
      16  main ()
      17  {
      18    #pragma omp target thread_limit (6)
      19    if (omp_get_thread_limit () > 6)
      20      abort ();
      21    foo ();
      22    return 0;
      23  }