Debian Codegraph @

gcc/testsuite/gfortran.dg/class_10.f03

raw
1 ! { dg-do compile }
2 !
3 ! PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789
4 !
5 ! Contributed by Harald Anlauf <[email protected]>
6
7 module abstract_gradient
8
9 implicit none
10 private
11
12 type, public, abstract :: gradient_class
13 contains
14 procedure, nopass :: inner_product
15 end type
16
17 contains
18
19 function inner_product ()
20 class(gradient_class), pointer :: inner_product
21 inner_product => NULL()
22 end function
23
24 end module
25
26
27 use abstract_gradient
28 class(gradient_class), pointer :: g_initial, ip_save
29 ip_save => g_initial%inner_product() ! ICE
30 end