• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1! RUN: %S/test_errors.sh %s %t %f18
2! Check for semantic errors in num_images() function calls
3
4subroutine test
5
6  ! correct calls, should produce no errors
7  print *, num_images()
8  print *, num_images(team_number=1)
9  print *, num_images(1)
10
11  ! incorrectly typed argument
12  ! the error is seen as too many arguments to the num_images() call with no arguments
13  !ERROR: too many actual arguments for intrinsic 'num_images'
14  print *, num_images(3.4)
15
16  ! call with too many arguments
17  !ERROR: too many actual arguments for intrinsic 'num_images'
18  print *, num_images(1, 1)
19
20  ! keyword argument with incorrect type
21  !ERROR: unknown keyword argument to intrinsic 'num_images'
22  print *, num_images(team_number=3.4)
23
24  ! incorrect keyword argument
25  !ERROR: unknown keyword argument to intrinsic 'num_images'
26  print *, num_images(team_numbers=1)
27
28  !TODO: test num_images() calls related to team_type argument
29
30end subroutine
31