summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/team_end_1.f90
blob: 02faca45a87c1b2b648aed610daa03be928f95cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
! { dg-options "-fcoarray=single" }
!
! Tests if team_number intrinsic fucntion works
!
  use iso_fortran_env, only : team_type
  implicit none
  type(team_type) :: team
  integer, parameter :: standard_initial_value=-1

  associate(new_team => mod(this_image(),2)+1)
    form team (new_team,team)
      change team (team)
    end team
  end associate

  if (team_number()/=standard_initial_value) STOP 1
end