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

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 05:45:14 PDT 2022


awarzynski added inline comments.


================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:268
+                 // pre-processed inputs.
+                .Case("f95", Language::Fortran)
+                .Case("f95-cpp-input", Language::Fortran)
----------------
rovka wrote:
> 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.
> Note that these are not file extensions, but values for the -x option.
Indeed, thanks Diana! For `clangDriver,` the available values for Fortran are defined  [[ https://github.com/llvm/llvm-project/blob/5fee1799f4d8da59c251e2d04172fc2f387cbe54/clang/include/clang/Driver/Types.def#L80-L81 | here ]].


================
Comment at: flang/test/Driver/parse-ir-error.f95:16
+!----------------
+! CHECK: error: expected integer
+! CHECK: error: Could not parse IR
----------------
rovka wrote:
> 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