1 ! Ensure arguments -D and -U work as expected.
3 !--------------------------
4 ! FLANG DRIVER (flang-new)
5 !--------------------------
6 ! RUN: %flang -E -P %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
7 ! RUN: %flang -E -P -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED
8 ! RUN: %flang -E -P -DX=A -UX %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
10 !-----------------------------------------
11 ! FRONTEND FLANG DRIVER (flang-new -fc1)
12 !-----------------------------------------
13 ! RUN: %flang_fc1 -E -P %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
14 ! RUN: %flang_fc1 -E -P -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED
15 ! RUN: %flang_fc1 -E -P -DX -UX %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
17 !--------------------------------------------
18 ! EXPECTED OUTPUT FOR AN UNDEFINED MACRO
19 !--------------------------------------------
21 ! UNDEFINED-NOT:program X
23 !--------------------------------------------
24 ! EXPECTED OUTPUT FOR MACRO 'X' DEFINED AS A
25 !--------------------------------------------
27 ! DEFINED-NOT:program B