brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 285f075 Raw
42 lines · plain
1! Verify that reading from stdin works as expected - Fortran input2 3!--------------------------4! FLANG DRIVER (flang)5!--------------------------6! Input type is implicit7! RUN: cat %s | %flang -E -cpp - | FileCheck %s --check-prefix=PP-NOT-DEFINED8! RUN: cat %s | %flang -DNEW -E -cpp - | FileCheck %s --check-prefix=PP-DEFINED9! RUN: cat %s | %flang -DNEW -E - | FileCheck %s --check-prefix=PP-NOT-DEFINED10! RUN: cat %s | %flang -DNEW -E -nocpp - | FileCheck %s --check-prefix=PP-NOT-DEFINED11 12! Input type is explicit13! RUN: cat %s | %flang -E -cpp -x f95-cpp-input - | FileCheck %s --check-prefix=PP-NOT-DEFINED14! RUN: cat %s | %flang -DNEW -E -cpp -x f95-cpp-input - | FileCheck %s --check-prefix=PP-DEFINED15 16!---------------------------------------17! FLANG FRONTEND DRIVER (flang -fc1)18!---------------------------------------19! Test `-E`: for the corresponding frontend actions the driver relies on the prescanner API to handle file I/O20! RUN: cat %s | %flang_fc1 -E -cpp | FileCheck %s --check-prefix=PP-NOT-DEFINED21! RUN: cat %s | %flang_fc1 -DNEW -E -cpp | FileCheck %s --check-prefix=PP-DEFINED22 23! Test `-test-io`: for the corresponding frontend action (`InputOutputTestAction`) the driver handles the file I/O on its own24! the corresponding action (`PrintPreprocessedAction`)25! RUN: cat %s | %flang_fc1 -test-io -cpp | FileCheck %s --check-prefix=IO --match-full-lines26! RUN: cat %s | %flang_fc1 -DNEW -cpp -test-io | FileCheck %s --check-prefix=IO --match-full-lines27 28! PP-NOT-DEFINED: Program B29! PP-DEFINED: Program A30 31! IO: #ifdef NEW32! IO-NEXT:   Program A33! IO-NEXT: #else34! IO-NEXT:   Program B35! IO-NEXT: #endif36 37#ifdef NEW38  Program A39#else40  Program B41#endif42