1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
2 ! Tests for the GETCWD intrinsics
4 subroutine bad_kind_error(cwd
, status
)
5 CHARACTER(len
=255) :: cwd
7 !ERROR: Actual argument for 'status=' has bad type or kind 'INTEGER(2)'
8 call getcwd(cwd
, status
)
9 end subroutine bad_kind_error
11 subroutine bad_args_error()
12 !ERROR: missing mandatory 'c=' argument
14 end subroutine bad_args_error
16 subroutine bad_apply_form(cwd
)
17 CHARACTER(len
=255) :: cwd
19 !Declaration of 'getcwd'
20 call getcwd(cwd
, status
)
21 !ERROR: Cannot call subroutine 'getcwd' like a function
23 end subroutine bad_apply_form
25 subroutine good_subroutine(cwd
, status
)
26 CHARACTER(len
=255) :: cwd
28 call getcwd(cwd
, status
)
29 end subroutine good_subroutine
31 subroutine good_function(cwd
, status
)
32 CHARACTER(len
=255) :: cwd
35 end subroutine good_function