[flang-commits] [flang] [flang] Set SAVE attribute for EQUIVALENCEd symbols consistently. (PR #67078)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Fri Sep 22 16:38:16 PDT 2023
vzakhari wrote:
It looks like the code formatting check is broken for some other PRs, so it should not be my problem.
More extensive testing uncovered the following problem.
```
module equiv
real dx,dy
common /blk/ dx
equivalence(dx,dy)
end module
```
With my changes I get the following module file:
```
module equiv
real(4),save::dx
real(4),save::dy
common/blk/dx
equivalence(dx,dy)
end
```
So the `SAVE` was explicitly printed, which causes `error: The entity 'dx' in COMMON block /blk/ may not have an explicit SAVE attribute` when the module is used.
I am planning to filter out the implicit `SAVE` in `mod-file.cpp`, but please let me know if I am on a wrong path.
https://github.com/llvm/llvm-project/pull/67078
More information about the flang-commits
mailing list