-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Do not write implicit SAVE attribute into the mod file. (#67215)
If it happens that a symbol has an implicit SAVE attribute, we have to omit it in the mod file writer. Otherwise it may violate F202X C862: The SAVE attribute shall not be specified for... an object that is in a common block.
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
! RUN: %python %S/test_modfile.py %s %flang_fc1 | ||
|
||
! Test that the implicit SAVE attribute (set | ||
! for the equivalenced symbols) is not written | ||
! into the mod file. | ||
module implicit_save | ||
real dx,dy | ||
common /blk/ dx | ||
equivalence(dx,dy) | ||
end module implicit_save | ||
|
||
!Expect: implicit_save.mod | ||
!moduleimplicit_save | ||
!real(4)::dx | ||
!real(4)::dy | ||
!common/blk/dx | ||
!equivalence(dx,dy) | ||
!end |