
This PR addresses some of the issues described in https://github.com/llvm/llvm-project/issues/127617. Key changes: - Stop assuming fixed-form for `-x f95` unless the input is a `.i` file. This change ensures compatibility with `-save-temps` workflows while preventing unintended fixed-form assumptions. - Ensure `-x f95-cpp-input` enables `-cpp` by default, aligning Flang's behavior with `gfortran`.
13 lines
388 B
Fortran
13 lines
388 B
Fortran
! This test verifies that using `-x f95` does not cause the driver to assume
|
|
! this file is in fixed-form.
|
|
|
|
program main
|
|
print *, "Hello, World!"
|
|
end
|
|
|
|
! RUN: %flang -### -x f95 %s 2>&1 | FileCheck --check-prefix=PRINT-PHASES %s
|
|
! PRINT-PHASES-NOT: -ffixed-form
|
|
|
|
! RUN: %flang -Werror -fsyntax-only -x f95 %s 2>&1 | FileCheck --check-prefix=COMPILE --allow-empty %s
|
|
! COMPILE-NOT: error
|