view gcc/testsuite/gfortran.dg/typebound_call_23.f03 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +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