llvm-project/flang/test/Semantics/form_team01b.f90
Peter Klausler 3f04fb42aa
[flang] Complete semantic checks for FORM TEAM (#131022)
Add remaining checking for the FORM TEAM statement, complete and enable
a test.
2025-03-19 11:59:59 -07:00

19 lines
849 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Check for semantic errors in form team statements
! This subtest contains tests for unimplemented errors.
subroutine test
use, intrinsic :: iso_fortran_env, only: team_type
type(team_type) :: team
integer :: team_number
integer, save, codimension[*] :: co_statvar
character(len=50), save, codimension[*] :: co_errvar
procedure(type(team_type)) teamfunc
!ERROR: The stat-variable or errmsg-variable in a form-team-spec-list may not be a coindexed object
FORM TEAM (team_number, team, STAT=co_statvar[this_image()])
!ERROR: The stat-variable or errmsg-variable in a form-team-spec-list may not be a coindexed object
FORM TEAM (team_number, team, ERRMSG=co_errvar[this_image()])
!ERROR: Team must be a variable in this context
form team (team_number, teamfunc())
end subroutine