[flang] Update CommandTest for AIX (NFC) (#118403)
[llvm-project.git] / flang / test / Semantics / OpenMP / taskgroup01.f90
blobe05051387411a303aa54902db43791d7f6e1cfa8
1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang %openmp_flags -fopenmp-version=50
5 use omp_lib
6 implicit none
7 integer :: xyz, abc
8 real :: reduction_var
9 !$omp parallel num_threads(4)
10 !$omp single
11 print *, "The"
12 !$omp taskgroup
13 !$omp task
14 print *, "almighty"
15 !$omp end task
16 !$omp task
17 print *, "sun"
18 !$omp end task
19 !$omp end taskgroup
20 !$omp end single
21 !$omp end parallel
23 !$omp parallel private(xyz)
24 !$omp taskgroup allocate(xyz)
25 !$omp task
26 print *, "The "
27 !$omp taskgroup allocate(omp_large_cap_mem_space: abc)
28 !$omp task
29 print *, "almighty sun"
30 !$omp end task
31 !$omp end taskgroup
32 !$omp end task
33 !$omp end taskgroup
34 !$omp end parallel
36 !ERROR: PRIVATE clause is not allowed on the TASKGROUP directive
37 !$omp taskgroup private(abc)
38 !$omp end taskgroup
40 !$omp parallel
41 !$omp task
42 !$omp taskgroup task_reduction(+ : reduction_var)
43 print *, "The "
44 !$omp taskgroup task_reduction(.or. : reduction_var) task_reduction(.and. : reduction_var)
45 print *, "almighty sun"
46 !$omp end taskgroup
47 !$omp end taskgroup
48 !$omp end task
49 !$omp end parallel
50 end program