aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/class_10.f03
blob: 1e3b8547bb06ccffdd00f94130451926e9fd1a06 (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
! { dg-do compile }
!
! PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789
!
! Contributed by Harald Anlauf <anlauf@gmx.de>

module abstract_gradient

  implicit none
  private

  type, public, abstract :: gradient_class
  contains
    procedure, nopass  :: inner_product
  end type

contains

  function inner_product ()
    class(gradient_class), pointer :: inner_product
    inner_product => NULL()
  end function

end module


 use abstract_gradient
 class(gradient_class), pointer    :: g_initial, ip_save
 ip_save => g_initial%inner_product()   ! ICE
end