119 lines · plain
1!REQUIRES: openmp_runtime2!RUN: %python %S/../test_errors.py %s %flang %openmp_flags -fopenmp -fopenmp-version=603 4module m5use omp_lib6 7implicit none8! Not in omp_lib yet.9integer, parameter :: omp_not_impex = 010integer, parameter :: omp_import = 111integer, parameter :: omp_export = 212integer, parameter :: omp_impex = 313 14contains15 16subroutine f0017 !$omp taskgraph18 !ERROR: Only task-generating constructs are allowed inside TASKGRAPH region19 !$omp parallel20 !$omp end parallel21 !$omp end taskgraph22end23 24subroutine f0125 !$omp taskgraph26 !$omp task27 !Non-task-generating constructs are ok if contained in an encountered task.28 !No diagnostic expected.29 !$omp parallel30 !$omp end parallel31 !$omp end task32 !$omp end taskgraph33end34 35subroutine f0236 !$omp taskgraph37 !ERROR: Transparent replayable tasks are not allowed in a TASKGRAPH region38 !$omp task transparent39 !$omp end task40 !$omp end taskgraph41 42 !$omp taskgraph43 !Not a transparent task.44 !No diagnostic expected.45 !$omp task transparent(omp_not_impex)46 !$omp end task47 !$omp end taskgraph48 49 !$omp taskgraph50 !Ok: transparent, but not replayable task.51 !No diagnostic expected.52 !$omp task replayable(.false.) transparent53 !$omp end task54 !$omp end taskgraph55end56 57subroutine f0358 integer(kind=omp_event_handle_kind) :: event59 60 !$omp taskgraph61 !ERROR: Detachable replayable tasks are not allowed in a TASKGRAPH region62 !$omp task detach(event)63 !$omp end task64 !$omp end taskgraph65 66 !$omp taskgraph67 !Ok: task is detachable, but not replayable.68 !No diagnostic expected69 !$omp task detach(event) replayable(.false.)70 !$omp end task71 !$omp end taskgraph72end73 74subroutine f0475 !$omp taskgraph76 !ERROR: Undeferred replayable tasks are not allowed in a TASKGRAPH region77 !$omp task if(.false.)78 !$omp end task79 !$omp end taskgraph80 81 !$omp taskgraph82 !Ok: task is undeferred, but not replayable.83 !No diagnostic expected.84 !$omp task if(.false.) replayable(.false.)85 !$omp end task86 !$omp end taskgraph87end88 89subroutine f0590 integer :: i91 92 !$omp taskgraph93 !ERROR: The NOGROUP clause must be specified on every construct in a TASKGRAPH region that could be enclosed in an implicit TASKGROUP94 !$omp taskloop95 do i = 1, 1096 enddo97 !$omp end taskloop98 !$omp end taskgraph99 100 !$omp taskgraph101 !This also applies to non-replayable constructs102 !ERROR: The NOGROUP clause must be specified on every construct in a TASKGRAPH region that could be enclosed in an implicit TASKGROUP103 !$omp taskloop replayable(.false.)104 do i = 1, 10105 enddo106 !$omp end taskloop107 !$omp end taskgraph108 109 !$omp taskgraph110 !No diagnostic expected.111 !$omp taskloop replayable(.false.) nogroup112 do i = 1, 10113 enddo114 !$omp end taskloop115 !$omp end taskgraph116end117 118end module119