RISC-V: testsuite: fix old-style function definition error [NFC]
[official-gcc.git] / libgomp / testsuite / libgomp.c / teams-4.c
blob6e065c51948fed492a5281e203d835288dd5b3cd
1 #include <omp.h>
2 #include <stdlib.h>
4 int
5 main ()
7 if (omp_get_num_teams () != 1 || omp_get_team_num () != 0)
8 abort ();
9 #pragma omp parallel num_threads (2)
10 if (omp_get_num_teams () != 1 || omp_get_team_num () != 0)
11 abort ();
12 #pragma omp teams num_teams (4)
14 int team = omp_get_team_num ();
15 if (omp_get_num_teams () != 4 || (unsigned) team >= 4U)
16 abort ();
17 #pragma omp parallel num_threads (3)
18 if (omp_get_num_teams () != 4 || omp_get_team_num () != team)
19 abort ();
20 #pragma omp parallel if (0)
21 #pragma omp target
22 #pragma omp teams num_teams (2)
23 if (omp_get_num_teams () != 2
24 || (unsigned) omp_get_team_num () >= 2U)
25 abort ();
26 if (omp_get_num_teams () != 4 || (unsigned) team >= 4U)
27 abort ();
29 return 0;