1! { dg-do compile }
2! { dg-additional-options "-fdump-tree-original" }
3! PR 87352 - this used to cause an excessive number of deallocations.
4module testmodule
5  implicit none
6  public
7
8  type :: evtlist_type
9     real,  allocatable, dimension(:) :: p1
10     real,  allocatable, dimension(:) :: p2
11     real,  allocatable, dimension(:) :: p3
12     real,  allocatable, dimension(:) :: p4
13  end type evtlist_type
14
15  type :: evtlistlist_type
16     type(evtlist_type)  :: evtlist(1:1)
17  end type evtlistlist_type
18
19end module testmodule
20
21program main
22  use testmodule
23  type(evtlist_type), dimension(10) :: a
24end program main
25! { dg-final  { scan-tree-dump-times "__builtin_free" 24 "original" } }
26