[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / num_images.f90
blobf77fc83f714f0dba9abdcdef492ad589696d1cf8
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Check for semantic errors in num_images() function calls
5 subroutine test
7 ! correct calls, should produce no errors
8 print *, num_images()
9 print *, num_images(team_number=1)
10 print *, num_images(1)
12 ! incorrectly typed argument
13 ! the error is seen as too many arguments to the num_images() call with no arguments
14 !ERROR: too many actual arguments for intrinsic 'num_images'
15 print *, num_images(3.4)
17 ! call with too many arguments
18 !ERROR: too many actual arguments for intrinsic 'num_images'
19 print *, num_images(1, 1)
21 ! keyword argument with incorrect type
22 !ERROR: unknown keyword argument to intrinsic 'num_images'
23 print *, num_images(team_number=3.4)
25 ! incorrect keyword argument
26 !ERROR: unknown keyword argument to intrinsic 'num_images'
27 print *, num_images(team_numbers=1)
29 !TODO: test num_images() calls related to team_type argument
31 end subroutine