Remove check for Android in Mips.cpp (#123793)
[llvm-project.git] / flang / test / Semantics / getcwd.f90
blobb6ff16eeec5ac7aa7f96c5a95fd0cf20bd0bbbf8
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
6 INTEGER(2) :: status
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
13 call getcwd()
14 end subroutine bad_args_error
16 subroutine bad_apply_form(cwd)
17 CHARACTER(len=255) :: cwd
18 INTEGER :: status
19 !Declaration of 'getcwd'
20 call getcwd(cwd, status)
21 !ERROR: Cannot call subroutine 'getcwd' like a function
22 status = getcwd(cwd)
23 end subroutine bad_apply_form
25 subroutine good_subroutine(cwd, status)
26 CHARACTER(len=255) :: cwd
27 INTEGER :: status
28 call getcwd(cwd, status)
29 end subroutine good_subroutine
31 subroutine good_function(cwd, status)
32 CHARACTER(len=255) :: cwd
33 INTEGER :: status
34 status = getcwd(cwd)
35 end subroutine good_function