[flang] Skip creating AggregateStores for common block associated aggregates
Previously, AggregateStores were created for aggregates associated with common blocks. As a) AggregateStoreMap uses scope and offset information to search for aggregate stores and b) variables related to common blocks have their offsets set relative to the common block itself, if there were multiple equivalences and at least one involved variables defined in a common block there was an opportunity for the scope/offset pairs to match between distinct aggregate stores. As a result, entries in AggregateStoreMap could collide, resulting in incorrect stores being returned for a particular variable. To prevent these collisions, skip creating AggregateStores for aggregates which are associated with common blocks. This information was already unused as aggregates associated with common blocks are handled by instantiateCommon. Fixes https://github.com/llvm/llvm-project/issues/57749 Differential Revision: https://reviews.llvm.org/D134828
Loading
Please sign in to comment