comparison gcc/testsuite/gfortran.dg/der_ptr_component_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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