llvm-project/flang/test/Semantics/unlockstmt01.f90
Sam Da Silva bee23dee2c [flang] Add new semantics tests for unlock-stmt
Add two semantics tests for `unlock-stmt`, one with standard-conforming
and one with non-standard conforming statements

Reviewed By: ktras

Differential Revision: https://reviews.llvm.org/D157409
2023-08-11 08:37:30 -07:00

17 lines
488 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
program test_unlock_stmt
use iso_fortran_env, only: lock_type
type(LOCK_TYPE) :: myLock[*], locks(10)[*]
integer :: stat_variable
character(len = 128) :: errmsg_variable
!___ standard-conforming statements ___
UNLOCK(myLock)
UNLOCK(locks(3))
Unlock(locks(1), stat = stat_variable)
Unlock(locks(2), ERRMSG = errmsg_variable)
Unlock(locks(4), stat = stat_variable, ERRMSG = errmsg_variable)
end program test_unlock_stmt