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 {
921
921
std::function<void (const Fortran::semantics::Symbol &, bool )>
922
922
insertSymbols = [&](const Fortran::semantics::Symbol &oriSymbol,
923
923
bool collectSymbol) {
924
- if (collectSymbol && oriSymbol.test (flag))
924
+ if (collectSymbol && oriSymbol.test (flag)) {
925
925
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) {
927
933
if (const auto *details{
928
934
oriSymbol
929
935
.detailsIf <Fortran::semantics::HostAssocDetails>()})
930
936
insertSymbols (details->symbol (), true );
937
+ }
931
938
};
932
939
insertSymbols (sym, collectSymbols);
933
940
};
You can’t perform that action at this time.
0 commit comments