(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.c-c++-common/
teams-1.c
       1  #include <omp.h>
       2  #include <stdlib.h>
       3  
       4  int
       5  main ()
       6  {
       7    #pragma omp teams num_teams (5)
       8    {
       9      if (omp_get_num_teams () != 5)
      10        abort ();
      11      #pragma omp distribute dist_schedule(static,1)
      12      for (int i = 0; i < 5; ++i)
      13        if (omp_get_team_num () != i)
      14  	abort ();
      15    }
      16    #pragma omp teams num_teams (7 : 9)
      17    {
      18      if (omp_get_num_teams () < 7 || omp_get_num_teams () > 9)
      19        abort ();
      20      #pragma omp distribute dist_schedule(static,1)
      21      for (int i = 0; i < omp_get_num_teams (); ++i)
      22        if (omp_get_team_num () != i)
      23  	abort ();
      24    }
      25    return 0;
      26  }