[Bug fortran/86006] New: compile time error generic type bound procedure
karl.may0 at freenet dot de
gcc-bugzilla@gcc.gnu.org
Wed May 30 22:21:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86006
Bug ID: 86006
Summary: compile time error generic type bound procedure
Product: gcc
Version: 8.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: karl.may0 at freenet dot de
Target Milestone: ---
This code:
Module Mod_LL_DT
Implicit None
Private
Type, Public :: LLCont_DT
contains
Generic :: GetElement => GetElementByType,GetElementByPosition
Procedure, PAss :: GetElementByType => SubGetElementByType
Procedure, PAss :: GetElementByPosition => SubGetElementByPosition
End type LLCont_DT
contains
Subroutine SubGetElementByType(this,TSIn,TSOut)
Implicit None
Class(LLCont_DT), Intent(InOut) :: this
Class(*), Intent(InOut), Pointer :: TSIn
Class(*), Intent(Out), Pointer :: TSOut
End Subroutine SubGetElementByType
Subroutine SubGetElementByPosition(this,TSC,ISPos)
Implicit None
Class(LLCont_DT), Intent(InOut) :: this
Class(*), Intent(InOut), Pointer :: TSC
Integer*8, Intent(In) :: ISPos
End Subroutine SubGetElementByPosition
End Module Mod_LL_DT
yields:
Generic :: GetElement => GetElementByType,GetElementByPosition
1
Error: ‘subgetelementbytype’ and ‘subgetelementbyposition’ for GENERIC
‘getelement’ at (1) are ambiguous
using compiler opiton:
gfortran -c tmp.f90
>From my understanding this should work. It also compiles without error with
other compilers (e.g. ifort)
Cheers
More information about the Gcc-bugs
mailing list