[FastISel] Support unreachable with NoTrapAfterNoReturn (#118296)
[llvm-project.git] / flang / test / Driver / missing-input.f90
blobaeefbe14c20563c0a56e98f9a1dc24cce121d943
1 ! Test the behaviour of the driver when input is missing or is invalid. Note
2 ! that with the compiler driver (flang), the input _has_ to be specified.
3 ! Indeed, the driver decides what "job/command" to create based on the input
4 ! file's extension. No input file means that it doesn't know what to do
5 ! (compile? preprocess? link?). The frontend driver (flang -fc1) simply
6 ! assumes that "no explicit input == read from stdin"
8 !--------------------------
9 ! FLANG DRIVER (flang)
10 !--------------------------
11 ! RUN: not %flang 2>&1 | FileCheck %s --check-prefix=FLANG-NO-FILE
12 ! RUN: not %flang %t.f90 2>&1 | FileCheck %s --check-prefix=FLANG-NONEXISTENT-FILE
14 !-----------------------------------------
15 ! FLANG FRONTEND DRIVER (flang -fc1)
16 !-----------------------------------------
17 ! RUN: not %flang_fc1 %t.f90 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-NONEXISTENT-FILE
18 ! RUN: not %flang_fc1 %S 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-DIR
20 ! FLANG-NO-FILE: flang{{.*}}: error: no input files
22 ! FLANG-NONEXISTENT-FILE: flang{{.*}}: error: no such file or directory: {{.*}}
23 ! FLANG-NONEXISTENT-FILE: flang{{.*}}: error: no input files
25 ! FLANG-FC1-NONEXISTENT-FILE: error: {{.*}} does not exist
26 ! FLANG-FC1-DIR: error: {{.*}} is not a regular file