Files
clang-p2996/flang/test/Preprocessing/fd-lines-as.f90
Jean-Didier PAILLEUX 370d34fe40 [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (#127605)
`-fd-lines-as-code` and `-fd-lines-as-comments` enables treatment for
lines beginning with `d` or `D` in fixed form sources.
Using these options in free form has no effect.
If the `-fd-lines-as-code` option is given they are treated as if the
first column contained a blank.
If the `-fd-lines-as-comments` option is given, they are treated as
comment lines.
2025-03-03 11:55:36 +00:00

24 lines
680 B
Fortran

! Ensure arguments -fd-lines-as-comments and -fd-lines-as-code display the correct output with -E.
!--------------------------
! Default behavior is equivalent as -fd-lines-as-comments
!--------------------------
! RUN: %flang -E -ffixed-form %s 2>&1 | FileCheck %s --check-prefix=COMMENT
! RUN: %flang -E -ffixed-form -fd-lines-as-comments %s 2>&1 | FileCheck %s --check-prefix=COMMENT
! RUN: %flang -E -ffixed-form -fd-lines-as-code %s 2>&1 | FileCheck %s --check-prefix=CODE
program FixedForm
d end
D end
end
! COMMENT: program FixedForm
! COMMENT: end
! COMMENT-NOT: end
! COMMENT-NOT: end
! CODE: program FixedForm
! CODE: end
! CODE: end
! CODE: end