https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86268
Bug ID: 86268 Summary: [9.0] Error on correct code with PDTs Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: juergen.reuter at desy dot de Target Milestone: --- The following code adapted from a code example posted on the Intel forum here (with an obvious programming error there): https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/780677 ifort and nagfor compile and run this with the expected result (1), but gfortran 9.0 trunk stumbles with the error message: $ gfortran pdt2.f90 pdt2.f90:12:13: Procedure, Pass :: suba 1 Error: Argument 'this' of 'suba' with PASS(this) at (1) must be of the derived-type 'myvec_int' Module testmod Private Type, Public, abstract :: myroot(k) Integer, kind :: k End type myroot Type, Public, extends(myroot), abstract :: myvec Integer(kind=8) :: lb1=1,ub1 End type myvec Type, Public, extends(myvec) :: myvec_int Integer(k), allocatable :: val(:,:) contains Procedure, Pass :: suba End type myvec_int contains ! Interface !Module Subroutine suba (this) class(myvec_int(8)), Intent(inout) :: this end Subroutine suba !end Interface End Module testmod Program Test use testmod Implicit none Type(myvec_int(8)), allocatable :: a allocate(a) write(*,*) a%lb1 End Program Test