mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
[flang] Fix common block size extension mistake in D109156
https://reviews.llvm.org/D109156 did not properly update the case where the equivalence symbol appearing in the common statement is the "base symbol of an equivalence group" (this was the only case that previously worked ok, and the patch broke it). Fix this and add a test that actually uses this code path. Differential Revision: https://reviews.llvm.org/D109439
This commit is contained in:
parent
d42f76fd36
commit
d892d7323e
@ -154,7 +154,7 @@ void ComputeOffsetsHelper::DoCommonBlock(Symbol &commonBlock) {
|
||||
auto eqIter{equivalenceBlock_.end()};
|
||||
auto iter{dependents_.find(symbol)};
|
||||
if (iter == dependents_.end()) {
|
||||
auto eqIter = equivalenceBlock_.find(symbol);
|
||||
eqIter = equivalenceBlock_.find(symbol);
|
||||
if (eqIter != equivalenceBlock_.end()) {
|
||||
DoEquivalenceBlockBase(symbol, eqIter->second);
|
||||
}
|
||||
|
@ -56,4 +56,8 @@ module me
|
||||
equivalence(i4, l4)
|
||||
equivalence(l4(10), k4)
|
||||
common /common6/ i4, j4 ! CHECK: common6 size=76 offset=0: CommonBlockDetails alignment=4:
|
||||
|
||||
integer :: i5, j5, l5(10)
|
||||
equivalence(l5(1), i5)
|
||||
common /common7/ j5, i5 ! CHECK: common7 size=44 offset=0: CommonBlockDetails alignment=4:
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user