xref: /llvm-project/flang/test/Semantics/change_team01c.f90 (revision 372210308e0bd66e79d570dc11b2ed1b47a4a63c)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2! XFAIL: *
3! Check for semantic errors in change team statements.
4! This subtest contains tests for unimplemented errors.
5
6subroutine test
7  use, intrinsic :: iso_fortran_env, only: team_type
8  type(team_type) :: team
9  integer, codimension[*] :: selector
10
11  ! A branch to an END TEAM statement is permitted only from within the corresponding CHANGE TEAM construct.
12  change team (team)
13    if (.true.) then
14      end team
15    end if
16  end team
17
18  ! A RETURN statement may not appear in a CHANGE TEAM construct.
19  change team (team)
20    ! ERROR: TBD
21    return
22  end team
23
24  ! On each image, the team variable specified in the CHANGE TEAM statement cannot become undefined or redefined during execution of the construct.
25  ! ERROR: TBD
26  change team (team)
27    team = get_team(INITIAL_TEAM)
28  end team
29end subroutine
30
31
32