https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86148
Bug ID: 86148
Summary: parameterized type compile time error
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: ---
This does not compile:
Module AA
Type, abstract :: parent(k)
Integer, kind :: k
Real(k) :: b
End type parent
Type, extends(parent) :: child
contains
Procedure, Pass :: A1 => SubA1
end type child
Interface
Module Subroutine SubA1(this)
Class(child(8)), Intent(In) :: this
end Subroutine
End Interface
end Module AA
SubModule(AA) xx
contains
Module Procedure SubA1
End procedure
End SubModule xx
gfortran stops with
Procedure, Pass :: A1 => SubA1
1
Error: Argument ‘this’ of ‘suba1’ with PASS(this) at (1) must be of the
derived-type ‘child’
f951: Fatal Error: Module file ‘aa.smod’ has not been generated, either because
the module does not contain a MODULE PROCEDURE or there is an error in the
module.
compilation terminated.
Compiles with ifort 17.07 and 18.03