53 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang %openmp_flags -fopenmp-version=504 5use omp_lib6 implicit none7 integer :: xyz, abc8 real :: reduction_var9 !$omp parallel num_threads(4)10 !$omp single11 print *, "The"12 !$omp taskgroup13 !$omp task14 print *, "almighty"15 !$omp end task16 !$omp task17 print *, "sun"18 !$omp end task19 !$omp end taskgroup20 !$omp end single21 !$omp end parallel22 23 !$omp parallel private(xyz)24 !$omp taskgroup allocate(xyz)25 !$omp task26 print *, "The "27 !$omp taskgroup allocate(omp_large_cap_mem_space: abc)28 !$omp task29 print *, "almighty sun"30 !$omp end task31 !$omp end taskgroup32 !$omp end task33 !$omp end taskgroup34 !$omp end parallel35 36 !ERROR: PRIVATE clause is not allowed on the TASKGROUP directive37 !$omp taskgroup private(abc)38 !$omp end taskgroup39 40 !$omp parallel41 !$omp task42 !$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 taskgroup49 !$omp end taskgroup50 !$omp end task51 !$omp end parallel52end program53