Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

A deferred binding is inherited by non-abstract type; It must be overridden

gianluca__montenegro
1,681 Views

I am trying to use deferred type bound procedures, which I gess are supported in the latest ifc 11.1.059 release, however I get the following error when I try to compile my code:

error #8313: A deferred binding is inherited by non-abstract type; It must be overridden [CP]
procedure(calculate_cp), deferred :: cp

I don't know where I made the mistake, any help?

Please find below the code.

Module var_specie_gm

IMPLICIT NONE

type, abstract :: polynomial
integer :: n_coeffs
real(8) :: upperTlimit
real(8) :: lowerTlimit
real(8) :: middleTlimit
contains
procedure(calculate_cp), deferred :: cp
end type polynomial

type, extends(polynomial) :: janafThermo
real(8), dimension(5) :: a_ht
real(8), dimension(5) :: a_lt
real(8) :: b_ht
real(8) :: b_lt
real(8) :: c_ht
real(8) :: c_lt
contains
procedure :: cp => janaf_cp_from_temperature
end type janafThermo

abstract interface
function calculate_cp(poly,T) result(cp)
import :: polynomial
class(polynomial) :: poly
real(8), intent(IN) :: T
real(8) :: cp
end function calculate_cp
end interface

contains


function janaf_cp_from_temperature(poly,T) result(cp)
class(janafThermo) :: poly
real(8), intent(in) :: T
real(8) :: cp

if(:)then
....
...

endif
end function janaf_cp_from_temperature

end module var_specie_gm

Thank you in advance.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
1,681 Views

This is a compiler bug which I think is fixed in the upcoming Update 5. I'll check that and update this post.

Edit: I can't reproduce the problem with your excerpt, but a problem very much like this is indeed fixed in Update 5.

0 Kudos
Reply