Peter Klausler 9fb2db1e1f
[flang] Retain spaces when preprocessing fixed-form source (#112417)
When running fixed-form source through the compiler under -E, don't
aggressively remove space characters, since the parser won't be parsing
the result and some tools might need to see the spaces in the -E
preprocessed output.

Fixes https://github.com/llvm/llvm-project/issues/112279.
2024-10-15 14:23:45 -07:00

13 lines
403 B
Fortran

! RUN: %flang -E %s 2>&1 | FileCheck %s
! CHECK: if (777 // C comment.eq. 777) then
! CHECK: print *, 'pp031.F no: ', 777 // C comment
* // C++ comment NOT erased from #define
integer, parameter :: KWM = 666
#define KWM 777 // C comment
if (KWM .eq. 777) then
print *, 'pp031.F FAIL (should not have compiled)'
else
print *, 'pp031.F no: ', KWM
end if
end