[all-commits] [llvm/llvm-project] 3a0352: [flang] Fix bug with USE of USE of generic

Tim Keith via All-commits all-commits at lists.llvm.org
Tue Dec 15 16:12:38 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a0352b85c14cb83150df62a9ea9ac3c4129060d
      https://github.com/llvm/llvm-project/commit/3a0352b85c14cb83150df62a9ea9ac3c4129060d
  Author: Tim Keith <tkeith at nvidia.com>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/symbol.cpp
    M flang/test/Semantics/resolve17.f90

  Log Message:
  -----------
  [flang] Fix bug with USE of USE of generic

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.

Differential Revision: https://reviews.llvm.org/D93343




More information about the All-commits mailing list