27 lines · plain
1! Test the behaviour of the driver when input is missing or is invalid. Note2! 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 input4! file's extension. No input file means that it doesn't know what to do5! (compile? preprocess? link?). The frontend driver (flang -fc1) simply6! assumes that "no explicit input == read from stdin"7 8!--------------------------9! FLANG DRIVER (flang)10!--------------------------11! RUN: not %flang 2>&1 | FileCheck %s --check-prefix=FLANG-NO-FILE12! RUN: not %flang %t.f90 2>&1 | FileCheck %s --check-prefix=FLANG-NONEXISTENT-FILE13 14!-----------------------------------------15! FLANG FRONTEND DRIVER (flang -fc1)16!-----------------------------------------17! RUN: not %flang_fc1 %t.f90 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-NONEXISTENT-FILE18! RUN: not %flang_fc1 %S 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-DIR19 20! FLANG-NO-FILE: flang{{.*}}: error: no input files21 22! FLANG-NONEXISTENT-FILE: flang{{.*}}: error: no such file or directory: {{.*}}23! FLANG-NONEXISTENT-FILE: flang{{.*}}: error: no input files24 25! FLANG-FC1-NONEXISTENT-FILE: error: {{.*}} does not exist26! FLANG-FC1-DIR: error: {{.*}} is not a regular file27