Files
clang-p2996/flang/test/Semantics/num_images.f90
Ivan Zhechev 6c1ac141d3 [Flang] Ported test_errors.sh to Python
To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script.

Used python regex in place of awk/sed.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D107575
2021-09-06 08:19:42 +00:00

31 lines
941 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Check for semantic errors in num_images() function calls
subroutine test
! correct calls, should produce no errors
print *, num_images()
print *, num_images(team_number=1)
print *, num_images(1)
! incorrectly typed argument
! the error is seen as too many arguments to the num_images() call with no arguments
!ERROR: too many actual arguments for intrinsic 'num_images'
print *, num_images(3.4)
! call with too many arguments
!ERROR: too many actual arguments for intrinsic 'num_images'
print *, num_images(1, 1)
! keyword argument with incorrect type
!ERROR: unknown keyword argument to intrinsic 'num_images'
print *, num_images(team_number=3.4)
! incorrect keyword argument
!ERROR: unknown keyword argument to intrinsic 'num_images'
print *, num_images(team_numbers=1)
!TODO: test num_images() calls related to team_type argument
end subroutine