brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 7729c85 Raw
64 lines · plain
1! REQUIRES: openmp_runtime2! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=523 4! OpenMP Version 5.2: 12.5.25! Various checks for DETACH Clause6 7program detach018    use omp_lib, only: omp_event_handle_kind9    implicit none10    real                                    :: e, x11    integer(omp_event_handle_kind)          :: event_01, event_02(2)12    integer(omp_event_handle_kind), pointer :: event_0313 14    type :: t15        integer(omp_event_handle_kind) :: event16    end type17    type(t) :: t_0118 19    !ERROR: The event-handle: `e` must be of type integer(kind=omp_event_handle_kind)20    !$omp task detach(e)21        x = x + 122    !$omp end task23 24    !ERROR: If a DETACH clause appears on a directive, then the encountering task must not be a FINAL task25    !$omp task detach(event_01) final(.false.)26        x = x + 127    !$omp end task28 29    !ERROR: A variable: `event_01` that appears in a DETACH clause cannot appear on PRIVATE clause on the same construct30    !$omp task detach(event_01) private(event_01)31        x = x + 132    !$omp end task33 34    !ERROR: A variable: `event_01` that appears in a DETACH clause cannot appear on FIRSTPRIVATE clause on the same construct35    !$omp task detach(event_01) firstprivate(event_01)36        x = x + 137    !$omp end task38 39    !ERROR: A variable: `event_01` that appears in a DETACH clause cannot appear on SHARED clause on the same construct40    !$omp task detach(event_01) shared(event_01)41        x = x + 142    !$omp end task43 44    !ERROR: A variable: `event_01` that appears in a DETACH clause cannot appear on IN_REDUCTION clause on the same construct45    !$omp task detach(event_01) in_reduction(+:event_01)46        x = x + 147    !$omp end task48 49    !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a DETACH clause50    !$omp task detach(event_02(1))51        x = x + 152    !$omp end task53 54    !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a DETACH clause55    !$omp task detach(t_01%event)56        x = x + 157    !$omp end task58 59    !ERROR: The event-handle: `event_03` must not have the POINTER attribute60    !$omp task detach(event_03)61        x = x + 162    !$omp end task63end program64