mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 04:16:46 +00:00

Add new semantics test for team_number and rename existing team_number semantics test. Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D128309
23 lines
638 B
Fortran
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
|