Fix generic parameter parsing loop#2125
Merged
Merged
Conversation
philberty
requested changes
Apr 16, 2023
philberty
left a comment
Member
There was a problem hiding this comment.
LGTM from reading the issue i think a test case of:
struct A<$
// dg-error ...
What is the output you get now?
Collaborator
Author
|
I have a test case like that, but |
Member
|
@powerboat9 I think the test case is more about the infinite loop, so you should add it. If the testcase does not infinite loop, then #2102 is fixed in my opinion. Your fix looks good |
Member
|
Yeah you might have success with trying the dg-excess-errors option if there are a cascade of errors |
Collaborator
Author
|
Ok, I got it working. |
CohenArthur
approved these changes
Apr 18, 2023
CohenArthur
left a comment
Member
There was a problem hiding this comment.
LGTM. I think there was an issue with using dg-timeout in our testsuite but I can't reproduce it, and not having it causes an infinite loop without the fix, so it's clearly needed.
gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_generic_params): Handle parameter parsing error. gcc/testsuite/ChangeLog: * rust/compile/issue-2125.rs: New test. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
CohenArthur
approved these changes
Apr 28, 2023
This file contains hidden or 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
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.
Should fix #2102, still trying to figure out how to write the test (if needed)