-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang] Allow continuation of D lines #66242
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.) Pull request: llvm#66242
llvmbot
added
flang
Flang issues not falling into any other category
flang:parser
labels
Sep 13, 2023
@llvm/pr-subscribers-flang-parser ChangesWhen 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:
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_)) { |
vdonaldson
approved these changes
Sep 13, 2023
EugeneZelenko
added
flang:frontend
and removed
flang
Flang issues not falling into any other category
flang:parser
labels
Sep 15, 2023
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this pull request
Sep 19, 2023
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.)
zahiraam
pushed a commit
to tahonermann/llvm-project
that referenced
this pull request
Oct 24, 2023
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.)
zahiraam
pushed a commit
to tahonermann/llvm-project
that referenced
this pull request
Oct 24, 2023
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.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.)