aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_50.f90
blob: e88d9d93f0eb31aa82b79dea6b30853ab5880ed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do compile }
! { dg-options "-fcoarray=single" }
!
! PR fortran/105526 - check TEAM arguments to coarray intrinsics

subroutine p
  use iso_fortran_env, only: team_type
  implicit none
  type(team_type) :: team
  type t
     integer :: i
  end type t
  type(t) :: z
  form team (0, team)
  form team (0, 0)      ! { dg-error "scalar expression of type TEAM_TYPE" }
  form team (0, [team]) ! { dg-error "scalar expression of type TEAM_TYPE" }
  form team ([0], team) ! { dg-error "scalar INTEGER" }
  form team (0., team)  ! { dg-error "scalar INTEGER" }
  change team (0)       ! { dg-error "scalar expression of type TEAM_TYPE" }
  end team
  sync team (0)         ! { dg-error "scalar expression of type TEAM_TYPE" }
end