[PATCH] D92978: [flang] Fix bug with USE of USE of generic

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 15:54:02 PST 2020


tskeith created this revision.
tskeith added reviewers: klausler, PeteSteinfeld.
tskeith added a project: Flang.
Herald added a subscriber: jdoerfert.
tskeith requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When merging use associations into a generic, we weren't handling
the case where the name that was use associated was itself a use
association. This is fixed by following that association to its
ultimate symbol (`useUltimate` in `DoAddUse`).

An example of the bug is `m12d` in `resolve17.f90`. `g` is associated
with `gc` in `m12c` which is associated with `gb` in `m12b`. It was that
last association that we weren't correctly following.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92978

Files:
  flang/lib/Semantics/resolve-names.cpp
  flang/lib/Semantics/symbol.cpp
  flang/test/Semantics/resolve17.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92978.310695.patch
Type: text/x-patch
Size: 4296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201209/5ce1283a/attachment.bin>


More information about the llvm-commits mailing list