view gcc/testsuite/gfortran.dg/typebound_proc_28.f03 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
!
! PR 56266: [OOP] ICE on invalid in gfc_match_varspec
!
! Contributed by Andrew Benson <abensonca@gmail.com>

module t

  implicit none

  type nc
   contains
     procedure :: encM => em
  end type nc

contains

  double precision function em(self)
    class(nc) :: self
    em=0.
  end function

  double precision function cem(c)
    type(nc) :: c
    cem=c(i)%encM()   ! { dg-error "Unclassifiable statement" }
  end function

end module