Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
2 Views

Extends Abstract Parameterized Derived Type

Hi, the following code snippet can be compiled but the compiler showed a warning messge that I didn't quite understand.

module test1
    implicit none
    
    private
    public :: tp1
    
    type, abstract :: tp1(length)
        private
        integer, len      :: length = 10
        character(length) :: s
    contains
        procedure(isub1), public, pass, deferred :: sub1
    end type tp1
    
    abstract interface
        subroutine isub1(this)
            import tp1
            class(tp1(*)), intent(in) :: this
        end subroutine isub1
    end interface
    
end module test1
    
module test2
    use test1, only: tp1
    implicit none
    
    private
    public :: tp2
    
    type, abstract, extends(tp1) :: tp2
    end type tp2
    
end module test2

warning #7925: An interface-block in a subprogram that contains an interface-body for a procedure defined by that subprogram is non-standard.   [TEST1^ISUB1]

If tp1 is not a parameterized type, the inheritance is just OK. So is there any restriction for extending an abstract parameterized derived type ?

0 Kudos
2 Replies
Highlighted
Valued Contributor III
2 Views

Looks like a false warning,

Looks like a false warning, suggest you submit this case to Intel support (OSC).

0 Kudos
Highlighted
New Contributor I
2 Views

Thanks FortranFan, I've

Thanks FortranFan, I've reported it to the OSC.

0 Kudos