[flang] Fix bug with IMPORT of USE of USE
authorTim Keith <tkeith@nvidia.com>
Mon, 11 May 2020 20:28:05 +0000 (13:28 -0700)
committerTim Keith <tkeith@nvidia.com>
Mon, 11 May 2020 20:28:07 +0000 (13:28 -0700)
commit6f300105d21e1f3bf7f0f92c2564c29f0cab8fb9
treeda940f40190af4564e638387d62997b9df4cfd3c
parente0c291a68264dbc13beb13faba3b6e3681c918de
[flang] Fix bug with IMPORT of USE of USE

When a module contained an import of a use-association of a
use-association, we weren't recognizing that the symbols was needed.
The fix is the follow all of the use-associations using `GetUltimate()`.

Differential Revision: https://reviews.llvm.org/D79737
flang/lib/Semantics/mod-file.cpp
flang/test/Semantics/modfile36.f90 [new file with mode: 0644]