mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:46:46 +00:00

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.
19 lines
375 B
Fortran
19 lines
375 B
Fortran
! 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
|