A type name in an IMPLICIT declaration that was later used in a PARAMETER
statement caused problems because the default symbol scope had not yet been
initialized. I avoided dereferencing in the situation where the default scope
was uninitialized and added a test that triggers the problem.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Semantics/symbol.cpp | ||
---|---|---|
544 ↗ | (On Diff #291278) | if (const Scope *localScope{scope ? scope : scope_}) { return dtDetails->GetParentComponent(localScope); } |
flang/lib/Semantics/symbol.cpp | ||
---|---|---|
544 ↗ | (On Diff #291278) | Thanks, Peter. I'll redo this section of code. |
flang/test/Semantics/bad-forward-type.f90 | ||
---|---|---|
76 | These messages both seem to be wrong: type t2 is defined later. And they are not associated with the line that has the error. Sorry about the late comment. |
Reopening to fix Tim's comments.
flang/test/Semantics/bad-forward-type.f90 | ||
---|---|---|
76 | I agree. I was focused on fixing the crash, but I should clean this up while I'm at it. I'll reopen the revision. Stay tuned for more changes. |
I added code to detect the actual error and associate it with the correct
source line. Note that the git commit message is changed with a more
detailed explanation.
These messages both seem to be wrong: type t2 is defined later. And they are not associated with the line that has the error.
Sorry about the late comment.