https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83646

            Bug ID: 83646
           Summary: (PDT) Use statement with PDTs excludes the specific
                    instances.
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: pault at gcc dot gnu.org
          Reporter: pault at gcc dot gnu.org
            Blocks: 82173
  Target Milestone: ---

As reported on clf
https://groups.google.com/forum/#!topic/comp.lang.fortran/NDE6JKTFbNU

[pault@pc30 pdt]$ cat f*2.f90
module m

   type :: t(ell)
      integer, len :: ell
      integer :: i(ell)
   end type

contains

   subroutine sub( a )
      type(t(ell=*)), intent(inout) :: a
   end

end module m
! main program
   use m, only : t,pdtt, sub

   type(t(ell=42)) :: foo

   call sub( foo )

end

[pault@pc30 pdt]$ ~/irun/bin/gfortran -static-libgfortran f*2.f90
-fdump-tree-original -g -fopenmp
fortranfan2.f90:20:18:

    call sub( foo )
                  1
Error: Type mismatch in argument ‘a’ at (1); passed TYPE(Pdtt) to TYPE(pdtt)

with
   use m, only : pdtt, t, sub

it compiles just fine.

Paul


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82173
[Bug 82173] [meta-bug] Parameterized derived type errors

Reply via email to