Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/pr104131.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fopenmp" }
3
4 program p
5 use iso_c_binding, only: c_intptr_t
6 implicit none
7 integer, parameter :: omp_event_handle_kind = c_intptr_t
8
9 type dt
10 integer(omp_event_handle_kind) :: f
11 end type
12 integer(omp_event_handle_kind) :: x(1)
13 type(dt) :: y
14
15 !$omp task detach(x) ! { dg-error "'x' at \\\(1\\\) should be a scalar of type integer\\\(kind=omp_event_handle_kind\\\)" }
16 !$omp end task
17
18 !$omp task detach(x(1)) ! { dg-error "The event handle at \\\(1\\\) must not be an array element" }
19 !$omp end task
20
21 !$omp task detach(y) ! { dg-error "'y' at \\\(1\\\) should be a scalar of type integer\\\(kind=omp_event_handle_kind\\\)" }
22 !$omp end task
23
24 !$omp task detach(y%f) ! { dg-error "The event handle at \\\(1\\\) must not be part of a derived type or class" }
25 !$omp end task
26 end program