This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/86472] allocatable array, bound-procedure, submodule
- From: "jfeng33 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Aug 2018 22:55:17 +0000
- Subject: [Bug fortran/86472] allocatable array, bound-procedure, submodule
- Auto-submitted: auto-generated
- References: <bug-86472-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86472
--- Comment #6 from Jim Feng <jfeng33 at hotmail dot com> ---
't' is a local variable of myfunc1. If I change to following:
------------------------------------------------------------
Module M1
implicit none
type :: mytype
contains
procedure :: myfunc1
end type
interface
module subroutine myfunc1(self, a)
class(mytype), intent(in) :: self
real, intent(in) :: a(:)
end subroutine myfunc1
end interface
End Module M1
submodule(M1) M2
contains
module procedure myfunc1
implicit none
real, allocatable :: t(:)
real :: x
allocate(t, source=a)
x=10.0
print *,t, a, x
end procedure myfunc1
end submodule M2
------------------------------------------------
Everything goes through without error. I thought "Such specifications have no
effect." was not clear. The uncharacteristic entities should not be specified
in the interface.