OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_call_15.f03] - Blame information for rev 715

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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 
6
 
7
module ice5
8
  type::a_type
9
   contains
10
     procedure::a_subroutine_1
11
     procedure::a_subroutine_2
12
  end type a_type
13
contains
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
23
end module ice5
24
 
25
! { dg-final { cleanup-modules "ice5" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.