xref: /llvm-project/flang/test/Driver/cpp-nocpp-command-line-macro.f90 (revision d5d420bb3bcc2eea926fb70fc3e6818c32e1eecc)
1!-----------
2! RUN lines
3!-----------
4! RUN: %flang_fc1 -E %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
5! RUN: %flang_fc1 -E -cpp -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED
6! RUN: %flang_fc1 -E -nocpp -DX=A %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
7
8! UNDEFINED:program B
9! UNDEFINED-NOT:program A
10
11! DEFINED:program A
12! DEFINED-NOT:program B
13
14#ifdef X
15program X
16#else
17program B
18#endif
19end
20