2 ! { dg-options "-fcoarray=single -std=f2008" }
6 ! Diagnostic for atomic subroutines
8 use iso_fortran_env
, only
: atomic_int_kind
, atomic_logical_kind
10 integer(atomic_int_kind
) :: a(1)[*]
12 integer(atomic_int_kind
) :: b
13 logical(atomic_logical_kind
) :: d
, e
[*]
15 call atomic_define(a
, 7_2) ! { dg-error "must be a scalar" }
16 call atomic_ref(b
, b
) ! { dg-error "shall be a coarray" }
18 call atomic_define(c
, 7) ! { dg-error "an integer of ATOMIC_INT_KIND or a logical of ATOMIC_LOGICAL_KIND" }
19 call atomic_ref(d
, a(1)) ! { dg-error "shall have the same type as 'atom'" }
20 call atomic_ref(.true
., e
) ! { dg-error "shall be definable" }