[PATCH] D127207: [flang][driver] Fix support for `-x`

Diana Picus via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 03:35:57 PDT 2022


rovka accepted this revision.
rovka added a comment.
This revision is now accepted and ready to land.

LGTM, thanks.



================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:268
+                 // pre-processed inputs.
+                .Case("f95", Language::Fortran)
+                .Case("f95-cpp-input", Language::Fortran)
----------------
ekieri wrote:
> Is there a reason to change from "f90" to "f95"? In my understanding, "f90" is more idiomatic for free-form fortran of any standard >= 90.
At least for `gfortran`, `f90` doesn't seem to be supported, only `f77`, `f77-cpp-input`, `f95`,  `f95-cpp-input` are.
https://raw.githubusercontent.com/gcc-mirror/gcc/master/gcc/doc/invoke.texi#:~:text=f77%20%20f77%2Dcpp%2Dinput%20f95%20%20f95%2Dcpp%2Dinput

Note that these are not file extensions, but values for the `-x` option.


================
Comment at: flang/test/Driver/parse-ir-error.f95:16
+!----------------
+! CHECK: error: expected integer
+! CHECK: error: Could not parse IR
----------------
Nit: I think checking just the "Could not parse IR" message should be enough.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127207/new/

https://reviews.llvm.org/D127207



More information about the cfe-commits mailing list