This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/86149] New: generic binding in derived types
- From: "karl.may0 at freenet dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jun 2018 11:35:52 +0000
- Subject: [Bug fortran/86149] New: generic binding in derived types
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86149
Bug ID: 86149
Summary: generic binding in derived types
Product: gcc
Version: 8.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: karl.may0 at freenet dot de
Target Milestone: ---
According to the last post in this thread
https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/779807
this code should not compile but it does
Module Mod_Test
Implicit None
Private
Type, Public :: test
contains
Generic :: Get => GetA,GetB
Procedure, PAss :: GetA => SubGetA
Procedure, PAss :: GetB => SubGetB
End type test
contains
Subroutine SubGetA(this,iin)
Implicit None
Class(test), Intent(InOut) :: this
Integer(kind=8), Intent(In), Pointer :: iin
write(*,*) "a"
End Subroutine SubGetA
Subroutine SubGetB(this,iin)
Implicit None
Class(test), Intent(InOut) :: this
integer(kind=8), Intent(InOut), allocatable :: iin
write(*,*) "b"
End Subroutine SubGetB
End Module Mod_Test
Program AA
use Mod_Test, only: Test
Type(Test) :: x
integer(kind=8), pointer :: c
integer(kind=8), allocatable :: d
call x%get(c)
call x%get(d)
end Program AA