29 lines · plain
1! Ensure arguments -D and -U work as expected.2 3!--------------------------4! FLANG DRIVER (flang)5!--------------------------6! RUN: %flang -E -P %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED7! RUN: %flang -E -P -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED8! RUN: %flang -E -P -DX=A -UX %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED9 10!-----------------------------------------11! FRONTEND FLANG DRIVER (flang -fc1)12!-----------------------------------------13! RUN: %flang_fc1 -E -P %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED14! RUN: %flang_fc1 -E -P -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED15! RUN: %flang_fc1 -E -P -DX -UX %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED16 17! UNDEFINED:program B18! UNDEFINED-NOT:program X19 20! DEFINED:program A21! DEFINED-NOT:program B22 23#ifdef X24program X25#else26program B27#endif28end29