-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fortran: avoid obsolescence warning for COMMON with submodule [PR111880]
gcc/fortran/ChangeLog: PR fortran/111880 * resolve.cc (resolve_common_vars): Do not call gfc_add_in_common for symbols that are USE associated or used in a submodule. gcc/testsuite/ChangeLog: PR fortran/111880 * gfortran.dg/pr111880.f90: New test.
- Loading branch information
1 parent
22f42cd
commit c9d029b
Showing
2 changed files
with
24 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,22 @@ | ||
! { dg-do compile } | ||
! { dg-options "-std=f2018" } | ||
! PR fortran/111880 - redundant warning of obsolescent COMMON with submodule | ||
|
||
module third_party_module | ||
integer :: some_param | ||
common /not_my_code/ some_param ! { dg-warning "COMMON block" } | ||
end module third_party_module | ||
|
||
module foo | ||
use third_party_module | ||
interface | ||
module subroutine bar() | ||
end subroutine bar | ||
end interface | ||
end module foo | ||
|
||
submodule (foo) foo_submod ! We do not need a warning here! | ||
contains | ||
module procedure bar | ||
end procedure bar | ||
end submodule foo_submod |