xref: /llvm-project/flang/test/Semantics/change_team01b.f90 (revision 372210308e0bd66e79d570dc11b2ed1b47a4a63c)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2! Check for semantic errors in change team statements
3! This subtest contains syntactic tests that prevent the main tests from being emitted.
4
5subroutine test
6  use, intrinsic :: iso_fortran_env, only: team_type
7  type(team_type) :: team
8
9  ! If a construct name appears on the CHANGE TEAM statement of the construct, the same name must also appear on the END TEAM construct.
10  block
11  construct: change team (team)
12  ! ERROR: CHANGE TEAM construct name required but missing
13  end team
14  end block
15  ! If a construct name appears on an END TEAM statement, the same construct name must appear on the corresponding CHANGE TEAM statement.
16  block
17  change team (team)
18  ! ERROR: CHANGE TEAM construct name unexpected
19  end team construct
20  end block
21  block
22  construct1: change team (team)
23  ! ERROR: CHANGE TEAM construct name mismatch
24  end team construct2
25  end block
26end subroutine
27
28
29