You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flang] Fix references to equivalenced variables in inner procedures
The code that collects that host associated variables variables in inner
procedures was seeing entities of type Fortran::lower::pft::Variable which
were created for handling Fortran variables that appear in EQUIVANCE
statements. Such entities throw an assertion when `getSymbol() is called on
them because they're not of the `Nominal` variant.
I wrote several tests (with help from Jean and Eric) for various situations
where EQUIVALENCE and host association were combined. In every case where
there was a host-associated Fortran variable appeared in an EQUIVALENCE
statement, there were two entities created -- an entity of the `AggregateStore`
variant and an entity of the `Nominal` variant.
So it seems safe and correct to just ignore `Variable`s of the `AggregateStore`
variant when gathering host associated entities. So that's what I did.
I also added a FIXME to deal with the fact that internal procedures that
access variables in EQUIVALENCE sets in outer scopes unnecessarily
create their own AggregateStore.
Note that my first attempt to fix this was in PR#1165.
0 commit comments