111
|
1 ! { dg-do run }
|
|
2 !
|
|
3 ! PR 61767: [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1491
|
|
4 !
|
|
5 ! Contributed by <reubendb@gmail.com>
|
|
6
|
|
7 module Communicator_Form
|
|
8 implicit none
|
|
9 type :: CommunicatorForm
|
|
10 contains
|
|
11 final :: Finalize
|
|
12 end type
|
|
13 type :: MessageTemplate
|
|
14 type ( CommunicatorForm ), pointer :: Communicator
|
|
15 end type
|
|
16 contains
|
|
17 subroutine Finalize ( C )
|
|
18 type ( CommunicatorForm ) :: C
|
|
19 ! should not be called
|
131
|
20 STOP 1
|
111
|
21 end subroutine
|
|
22 end module
|
|
23
|
|
24 program p
|
|
25 use Communicator_Form
|
|
26 implicit none
|
|
27 class ( MessageTemplate ), pointer :: M
|
|
28 allocate(M)
|
|
29 deallocate(M)
|
|
30 end
|