llvm-project/flang/test/Semantics/team_number01.f90
Naje George 4dc752e6ec [flang] Add new semantics test for team_number function
Add new semantics test for team_number and rename existing
team_number semantics test.

Reviewed By: ktras

Differential Revision: https://reviews.llvm.org/D128309
2022-06-30 14:05:11 -07:00

23 lines
638 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Check for semantic errors in team_number() function calls
subroutine test
use, intrinsic :: iso_fortran_env, only: team_type
type(team_type) :: team
! correct calls, should produce no errors
team = get_team()
print *, team_number()
print *, team_number(team)
print *, team_number(team=team)
! call with too many arguments
!ERROR: too many actual arguments for intrinsic 'team_number'
print *, team_number(1, 3)
! keyword argument with incorrect type
!ERROR: Actual argument for 'team=' has bad type 'REAL(4)'
print *, team_number(team=3.1415)
end subroutine