This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/69396] ICE on type mismatch, in update_ppc_arglist, at fortran/resolve.c:5580


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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
FYI, works with correct type specification :


$ cat z2.f90
module m1
   type t1
   end type
end

module m2
   use m1
   type t2
      procedure(f), pointer :: f2 => f2a
      procedure(g), pointer :: g2 => g2a
   end type

   abstract interface
      subroutine f (this, x)
         import :: t1, t2
         class(t2) :: this
         type(t1) :: x
      end

      subroutine g (this, x)
         import :: t1, t2
         class(t2) :: this
         type(t1) :: x
      end
   end interface

contains

   subroutine f2a (this, x)
      class(t2) :: this
      type(t1) :: x      !!! t1 instead of t2
      call this%g2 (x)
   end

   subroutine g2a (this, x)
      class(t2) :: this
      type(t1) :: x
   end
end

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]