blob: e31bd6de41db366e8c7a25dc3e8466d60c89a9a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR 50919: [OOP] Don't use vtable for NON_OVERRIDABLE TBP
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
module m
type t
contains
procedure, nopass, NON_OVERRIDABLE :: testsub
procedure, nopass, NON_OVERRIDABLE :: testfun
end type t
contains
subroutine testsub()
print *, "t's test"
end subroutine
integer function testfun()
testfun = 1
end function
end module m
use m
class(t), allocatable :: x
allocate(x)
call x%testsub()
print *,x%testfun()
end
! { dg-final { scan-tree-dump-times "_vptr->" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
|