xref: /llvm-project/flang/test/Semantics/unlockstmt01.f90 (revision bee23dee2ce2d547689700d38f2bdc6198582670)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2program test_unlock_stmt
3
4  use iso_fortran_env, only: lock_type
5
6  type(LOCK_TYPE) :: myLock[*], locks(10)[*]
7  integer :: stat_variable
8  character(len = 128) :: errmsg_variable
9
10  !___ standard-conforming statements ___
11  UNLOCK(myLock)
12  UNLOCK(locks(3))
13  Unlock(locks(1), stat = stat_variable)
14  Unlock(locks(2), ERRMSG = errmsg_variable)
15  Unlock(locks(4), stat = stat_variable, ERRMSG = errmsg_variable)
16end program test_unlock_stmt
17