[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)
Tarun Prabhu via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 7 04:53:32 PST 2025
=?utf-8?q?IƱaki?= Amatria Barral <inaki.amatria at appentra.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/130268 at github.com>
================
@@ -0,0 +1,12 @@
+! 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 -x f95 %s 2>&1 | FileCheck --check-prefix=COMPILE --allow-empty %s
----------------
tarunprabhu wrote:
With this test as written, a linker and the runtime libraries are both required. Is this necessary? Is the intention to check that the free-form code here is parsed correctly? If so, is `-emit-llvm` or `-emit-mlir` sufficient?
https://github.com/llvm/llvm-project/pull/130268
More information about the cfe-commits
mailing list