1! REQUIRES: openmp_runtime 2 3! RUN: %python %S/../test_errors.py %s %flang %openmp_flags -fopenmp-version=50 4 5use 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 22 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 35 36 !ERROR: PRIVATE clause is not allowed on the TASKGROUP directive 37 !$omp taskgroup private(abc) 38 !$omp end taskgroup 39 40 !$omp parallel 41 !$omp task 42 !$omp taskgroup task_reduction(+ : reduction_var) 43 print *, "The " 44 !ERROR: The type of 'reduction_var' is incompatible with the reduction operator. 45 !ERROR: The type of 'reduction_var' is incompatible with the reduction operator. 46 !$omp taskgroup task_reduction(.or. : reduction_var) task_reduction(.and. : reduction_var) 47 print *, "almighty sun" 48 !$omp end taskgroup 49 !$omp end taskgroup 50 !$omp end task 51 !$omp end parallel 52end program 53