Files
clang-p2996/flang/test/Preprocessing/cond-contin.F90
Peter Klausler 5d15f606da [flang][preprocessing] Mix preprocessing directives with free form li… (#96244)
…ne continuation

Allow preprocessing directives to appear between a source line and its
continuation, including conditional compilation directives (#if, #ifdef,
&c.).

Fixes https://github.com/llvm/llvm-project/issues/95476.
2024-06-24 10:18:50 -07:00

22 lines
293 B
Fortran

! RUN: %flang_fc1 -E %s 2>&1 | FileCheck %s
! CHECK: subroutine test(ARG1, FA, FB, ARG2)
! CHECK: end
subroutine test( &
ARG1, &
! test
#ifndef SWAP
#define ARG1 FA
#define ARG2 FB
#else
#define ARG1 FB
#define ARG2 FA
#endif
ARG1, ARG2, &
! test
#undef ARG1
#undef ARG2
&ARG2)
! comment
end