File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -921,13 +921,20 @@ class FirConverter : public Fortran::lower::AbstractConverter {
921921 std::function<void (const Fortran::semantics::Symbol &, bool )>
922922 insertSymbols = [&](const Fortran::semantics::Symbol &oriSymbol,
923923 bool collectSymbol) {
924- if (collectSymbol && oriSymbol.test (flag))
924+ if (collectSymbol && oriSymbol.test (flag)) {
925925 symbolSet.insert (&oriSymbol);
926- else if (checkHostAssociatedSymbols)
926+ } else if (const auto *commonDetails =
927+ oriSymbol.detailsIf <
928+ Fortran::semantics::CommonBlockDetails>()) {
929+ for (const auto &mem : commonDetails->objects ())
930+ if (collectSymbol && mem->test (flag))
931+ symbolSet.insert (&(*mem).GetUltimate ());
932+ } else if (checkHostAssociatedSymbols) {
927933 if (const auto *details{
928934 oriSymbol
929935 .detailsIf <Fortran::semantics::HostAssocDetails>()})
930936 insertSymbols (details->symbol (), true );
937+ }
931938 };
932939 insertSymbols (sym, collectSymbols);
933940 };
You can’t perform that action at this time.
0 commit comments