[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

David Truby via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 08:07:51 PST 2024


================
@@ -777,6 +777,15 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
 
   addFortranDialectOptions(Args, CmdArgs);
 
+  // 'flang -E' always produces output that is suitable for use as fixed form
+  // Fortran. However it is only valid free form source if the original is also
+  // free form.
+  if (InputType == types::TY_PP_Fortran &&
+      !Args.hasArg(options::OPT_ffixed_form) &&
+      !Args.hasArg(options::OPT_ffree_form)) {
----------------
DavidTruby wrote:

I'm not seeing `getLastArg` here on the github review.. Is this github being weird?

https://github.com/llvm/llvm-project/pull/117563


More information about the cfe-commits mailing list