https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104097
Bug ID: 104097 Summary: parameterized derived type (PDT) with type-bound procedure Product: gcc Version: og11 (devel/omp/gcc-11) Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: vivekrao4 at yahoo dot com Target Milestone: --- The code module m implicit none type :: t(n) integer, len :: n = 0 integer :: vec(n) contains procedure :: disp end type t contains subroutine disp(dt) class(t(n=*)), intent(in) :: dt print*,dt%vec end subroutine disp end module m ! program main use m implicit none integer, parameter :: n = 3 type(t(n)) :: x x%vec = [1,4,9] print*,x%vec call x%disp() end program main compiles and runs with Intel Fortran, giving output 1 4 9 1 4 9 but with gfortran I get (base) /mnt/c/fortran/test$ gfortran-11 --version GNU Fortran (Ubuntu 11.1.0-1ubuntu1~20.04) 11.1.0 <snip> (base) /mnt/c/fortran/test$ gfortran-11 pdt_tbp.f90 pdt_tbp.f90:7:13: 7 | procedure :: disp | 1 Error: Argument ‘dt’ of ‘disp’ with PASS(dt) at (1) must be of the derived-type ‘t’ pdt_tbp.f90:17:5: 17 | use m | 1 Fatal Error: Cannot open module file ‘m.mod’ for reading at (1): No such file or directory compilation terminated.