Hi there.
This code:
Module Test_Parent
Type, abstract :: Parent
contains
Procedure(FunGetPt), Pass, Deferred :: getPt
End type Parent
Abstract Interface
Function FunGetPt(this)
Import parent
Class(parent), Intent(In), Target :: this
Real, Pointer :: FunGetPt(:,:)
End Function FunGetPt
End Interface
Type, extends(parent) :: Progeny
Real, allocatable :: a(:,:)
contains
Procedure, Pass :: getPt => FunGetPt_Pr
End type Progeny
contains
Function FunGetPt_Pr(this)
Class(progeny), Intent(In), Target :: this
Real, Pointer :: FunGetPt_Pr(:,:)
FunGetPt_Pr=>this%a
End Function FunGetPt_Pr
End Module Test_Parent
Program PP
use Test_Parent, only: progeny
Implicit None
Type(progeny), Target :: a
Real, Pointer, contiguous :: b(:,:)=>null()
allocate(a%a(10,10),source=10.0)
b=>a%getPt()
End Program PPyields
Test.f90(31): error #5558: A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target b=>a%getPt() --^ compilation aborted for Test.f90 (code 1)
when compiled with 18.0 and
ifort -o0 -check all Test.f90
It runs when using 17.4.
Is that a Bug??
Cheers