This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68243] QOI: no warning about unused entities in submodules
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Nov 2015 10:32:36 +0000
- Subject: [Bug fortran/68243] QOI: no warning about unused entities in submodules
- Auto-submitted: auto-generated
- References: <bug-68243-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68243
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #1)
> Confirmed.
Isn't this testcase a demonstration that unused3 and unused4 can be used
outside of m2?
module m1
implicit none
private
interface
module subroutine s1
end subroutine
end interface
public s1
integer unused1
contains
subroutine unused2
end subroutine
end module
submodule (m1) m2
implicit none
integer :: unused3 = 9
contains
subroutine unused4
unused3 = 99
end subroutine
end submodule
submodule (m1:m2) m3
implicit none
contains
module procedure s1
print *, unused3
call unused4
print *, unused3
end procedure
end submodule
use m1
call s1
end
Cheers
Paul