Commit 560bb013 by Janus Weil

re PR fortran/50960 ([OOP] vtables not marked as constant)

2011-11-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50960
	* gfortran.dg/typebound_call_22.f03: New test case.

From-SVN: r181208
parent ed10039e
2011-11-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/50960
* gfortran.dg/typebound_call_22.f03: New test case.
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/50016
......
! { dg-do compile }
! { dg-options "-fdump-tree-optimized -O" }
!
! PR 50960: [OOP] vtables not marked as constant
!
! This test case checks whether the type-bound call to "x%bar"
! is optimized into a static call to "base".
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
module m
type t
contains
procedure, nopass :: bar => base
end type
contains
subroutine base()
write(*,*) 'base'
end subroutine
end module
program test
use m
class(t), allocatable :: x
allocate (t :: x)
call x%bar ()
end program
! { dg-final { scan-tree-dump-times "base \\(\\);" 1 "optimized" } }
! { dg-final { cleanup-tree-dump "optimized" } }
! { dg-final { cleanup-modules "m" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment