PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / finalize_31.f90
blob0c061a23a2370193c1d1941a64717f49e76c5499
1 ! { dg-do run }
3 ! PR 61767: [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1491
5 ! Contributed by <reubendb@gmail.com>
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
20 STOP 1
21 end subroutine
22 end module
24 program p
25 use Communicator_Form
26 implicit none
27 class ( MessageTemplate ), pointer :: M
28 allocate(M)
29 deallocate(M)
30 end