1! { dg-do compile }
2!
3! PR 44558: [OOP] ICE on invalid code: called TBP subroutine as TBP function
4!
5! Contributed by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
6
7module ice5
8  type::a_type
9   contains  
10     procedure::a_subroutine_1
11     procedure::a_subroutine_2
12  end type a_type
13contains
14  real function a_subroutine_1(this)
15    class(a_type)::this
16    real::res
17    res=this%a_subroutine_2()     ! { dg-error "should be a FUNCTION" }
18  end function
19  subroutine a_subroutine_2(this)
20    class(a_type)::this
21    call this%a_subroutine_1()    ! { dg-error "should be a SUBROUTINE" }
22  end subroutine
23end module ice5
24 
25