| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fcoarray=single -std=f2008" } |
| 3 |
! |
| 4 |
use iso_fortran_env, only: atomic_int_kind, atomic_logical_kind |
| 5 |
implicit none |
| 6 |
|
| 7 |
intrinsic :: atomic_define |
| 8 |
intrinsic :: atomic_ref |
| 9 |
intrinsic :: atomic_cas ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 10 |
intrinsic :: atomic_add ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 11 |
intrinsic :: atomic_and ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 12 |
intrinsic :: atomic_or ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 13 |
intrinsic :: atomic_xor ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 14 |
intrinsic :: atomic_fetch_add ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 15 |
intrinsic :: atomic_fetch_and ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 16 |
intrinsic :: atomic_fetch_or ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 17 |
intrinsic :: atomic_fetch_xor ! { dg-error "not available in the current standard settings but new in Fortran 2018." } |
| 18 |
integer(atomic_int_kind) :: caf[*], var |
| 19 |
logical(atomic_logical_kind) :: caf_log[*], var2 |
| 20 |
integer :: stat |
| 21 |
integer(1) :: stat2 |
| 22 |
|
| 23 |
call atomic_define(caf, 5, stat=stat) ! { dg-error "STAT= argument to atomic_define" } |
| 24 |
call atomic_define(caf_log, .true., stat=stat2) ! { dg-error "must be of kind 4" } |
| 25 |
call atomic_ref(var, caf[1], stat=stat2) ! { dg-error "must be of kind 4" } |
| 26 |
call atomic_ref(var2, caf_log[1], stat=stat) ! { dg-error "STAT= argument to atomic_ref" } |
| 27 |
end |