1 /* PR middle-end/102972 */
8 extern int omp_get_num_teams (void);
9 extern void omp_set_num_teams (int);
10 extern int omp_get_team_size (int);
11 extern int omp_get_team_num (void);
12 extern int omp_get_max_teams (void);
13 extern void omp_set_teams_thread_limit (int);
14 extern int omp_get_teams_thread_limit (void);
15 extern int omp_is_initial_device (void);
16 extern int omp_get_num_threads (void);
28 #pragma omp distribute
29 for (int i
= 0; i
< 64; i
++)
32 int n
= omp_get_num_teams ();
33 if (n
>= omp_get_team_num ())
36 #pragma omp parallel for
37 for (int i
= 0; i
< 64; i
++)
38 if (!omp_is_initial_device () || omp_get_num_threads () < 0)
42 for (int i
= 0; i
< 64; i
++)
51 #pragma distribute parallel for simd
52 for (int i
= 0; i
< 64; i
++)
56 n
+= omp_get_team_size (0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_team_size\[^\n\r]*' strictly nested in a 'teams' region" } */
57 n
+= omp_get_num_teams ();
58 n
+= omp_get_team_num ();
59 omp_set_num_teams (n
); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_num_teams\[^\n\r]*' strictly nested in a 'teams' region" } */
60 n
+= omp_get_max_teams (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_max_teams\[^\n\r]*' strictly nested in a 'teams' region" } */
61 n
+= omp_get_teams_thread_limit (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_teams_thread_limit\[^\n\r]*' strictly nested in a 'teams' region" } */
62 omp_set_teams_thread_limit (n
); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_teams_thread_limit\[^\n\r]*' strictly nested in a 'teams' region" } */