view gcc/testsuite/gfortran.dg/typebound_call_23.f03 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
!
! PR 52968: [OOP] Call to type-bound procedure wrongly rejected
!
! Contributed by Reuben Budiardja <reubendb@gmail.com>

module SolverModule

 type :: SolverType
   class ( EquationTemplate ), pointer :: Equation
 end type

 type :: EquationTemplate
 contains
   procedure, nopass :: Evaluate
 end type

contains

  subroutine Evaluate ()
  end subroutine

 subroutine Solve
   type ( SolverType ) :: S
   call S % Equation % Evaluate ()
 end subroutine

end module