[flang-commits] [flang] [Flang][OpenMP] Fix compilation error when a line with Fixed Source Form Conditional Compilation Sentinels is a continuation line (PR #70309)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Thu Oct 26 09:20:20 PDT 2023


================
@@ -997,14 +997,12 @@ const char *Prescanner::FixedFormContinuationLine(bool mightNeedSpace) {
   }
   tabInCurrentLine_ = false;
   char col1{*nextLine_};
-  if (InCompilerDirective()) {
----------------
klausler wrote:

By deleting the contextual test `if (InCompilerDirective)`, this code will apply to lines that do not follow an initial compiler directive line.  This will allow continuation to take place if an apparent compiler directive continuation line follows a source line that is not a compiler directive; it will also allow line continuation when an apparent compiler directive continuation line's sentinel does not match the sentinel of the original compiler directive (e.g., `!$OMP&` after an `!$ACC` line).  Is this new behavior intentional?

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


More information about the flang-commits mailing list