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] New: ICE on type mismatch, in update_ppc_arglist, at fortran/resolve.c:5580


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

            Bug ID: 69396
           Summary: ICE on type mismatch, in update_ppc_arglist, at
                    fortran/resolve.c:5580
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

$ cat z1.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(t2) :: x
      call this%g2 (x)
   end

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


$ gfortran-6.0.0 -c z1.f90
z1.f90:9:40:

       procedure(f), pointer :: f2 => f2a
                                        1

Error: Interface mismatch in procedure pointer assignment at (1): Type mismatch
in argument 'x' (TYPE(t1)/TYPE(t2))
z1.f90:9:40:

       procedure(f), pointer :: f2 => f2a
                                        1

Error: Interface mismatch in procedure pointer assignment at (1): Type mismatch
in argument 'x' (TYPE(t1)/TYPE(t2))
z1.f90:9:40:

       procedure(f), pointer :: f2 => f2a
                                        1

Error: Interface mismatch in procedure pointer assignment at (1): Type mismatch
in argument 'x' (TYPE(t1)/TYPE(t2))
z1.f90:9:40:

       procedure(f), pointer :: f2 => f2a
                                        1

Error: Interface mismatch for procedure-pointer component âf2â in structure
constructor at (1): Type mismatch in argument 'x' (TYPE(t1)/TYPE(t2))
f951: internal compiler error: in update_ppc_arglist, at fortran/resolve.c:5580

---

$ gfortran-5.3.1 -c z1.f90
...
(null):0: confused by earlier errors, bailing out


$ gfortran-4.9.0 -c z1.f90
...
f951: internal compiler error: in update_ppc_arglist, at fortran/resolve.c:5346

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