1! Test the behaviour of the driver when input is missing or is invalid. Note
2! that with the compiler driver (flang-new), 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-new -fc1) simply
6! assumes that "no explicit input == read from stdin"
7
8!--------------------------
9! FLANG DRIVER (flang-new)
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
13
14!-----------------------------------------
15! FLANG FRONTEND DRIVER (flang-new -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
19
20! FLANG-NO-FILE: flang-new: error: no input files
21
22! FLANG-NONEXISTENT-FILE: flang-new: error: no such file or directory: {{.*}}
23! FLANG-NONEXISTENT-FILE: flang-new: error: no input files
24
25! FLANG-FC1-NONEXISTENT-FILE: error: {{.*}} does not exist
26! FLANG-FC1-DIR: error: {{.*}} is not a regular file
27