[flang-commits] [flang] [flang] Allow continuation of D lines (PR #66242)
via flang-commits
flang-commits at lists.llvm.org
Wed Sep 13 10:00:46 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-parser
<details>
<summary>Changes</summary>
When the old extension of D debug lines in fixed form source is enabled, recognize continuation lines that begin with a D.
(No test is added, since the community's driver doesn't support the GNU Fortran option -fd-lines-as-code.)
--
Full diff: https://github.com/llvm/llvm-project/pull/66242.diff
1 Files Affected:
- (modified) flang/lib/Parser/prescan.cpp (+5-2)
<pre>
diff --git a/flang/lib/Parser/prescan.cpp b/flang/lib/Parser/prescan.cpp
index 6ed1581209da68e..2f25b02bf7a323d 100644
--- a/flang/lib/Parser/prescan.cpp
+++ b/flang/lib/Parser/prescan.cpp
@@ -1041,8 +1041,11 @@ const char *Prescanner::FixedFormContinuationLine(bool mightNeedSpace) {
tabInCurrentLine_ = true;
return nextLine_ + 2; // VAX extension
}
- if (col1 == ' ' && nextLine_[1] == ' ' && nextLine_[2] == ' ' &&
- nextLine_[3] == ' ' && nextLine_[4] == ' ') {
+ if ((col1 == ' ' ||
+ ((col1 == 'D' || col1 == 'd') &&
+ features_.IsEnabled(LanguageFeature::OldDebugLines))) &&
+ nextLine_[1] == ' ' && nextLine_[2] == ' ' && nextLine_[3] == ' ' &&
+ nextLine_[4] == ' ') {
char col6{nextLine_[5]};
if (col6 != '\n' && col6 != '\t' && col6 != ' ' && col6 != '0') {
if ((col6 == 'i' || col6 == 'I') && IsIncludeLine(nextLine_)) {
</pre>
</details>
https://github.com/llvm/llvm-project/pull/66242
More information about the flang-commits
mailing list