111
|
1 ! { dg-do run }
|
|
2 !
|
|
3 ! Freeing the width_data lead to double free. This testcase tests that
|
|
4 ! pr79230 is fixed now.
|
|
5
|
|
6 program main_ut
|
|
7 implicit none
|
|
8
|
|
9 type :: data_t
|
|
10 character, allocatable :: c1
|
|
11 end type
|
|
12
|
|
13 type :: t1_t
|
|
14 character, allocatable :: c2
|
|
15 class(data_t), pointer :: width_data
|
|
16 end type
|
|
17
|
|
18 call evaluator
|
|
19
|
|
20 contains
|
|
21
|
|
22 subroutine evaluator
|
|
23 type(data_t), target :: par_real
|
|
24 type(t1_t) :: field
|
|
25 field%width_data => par_real
|
|
26 end subroutine
|
|
27
|
|
28 end
|
|
29
|
|
30
|