=?utf-8?q?Iñaki?= Amatria Barral <inaki.amat...@appentra.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/130...@github.com>
================ @@ -817,8 +817,13 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, // '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 && + // free form. Ensure this logic does not incorrectly assume fixed-form for + // cases where it shouldn't, such as `flang -x f95 foo.f90`. + bool isAtemporaryPreprocessedFile = + Input.isFilename() && + llvm::sys::path::extension(Input.getFilename()) + .ends_with(types::getTypeTempSuffix(InputType, /*CLStyle=*/false)); + if (InputType == types::TY_PP_Fortran && isAtemporaryPreprocessedFile && ---------------- DavidTruby wrote: Sorry I thought it was this part but I actually think it is the other change 😓 https://github.com/llvm/llvm-project/pull/130268 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits