| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fdump-tree-original" } |
| 3 |
! PR 87352 - this used to cause an excessive number of deallocations. |
| 4 |
module 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 |
|
| 19 |
end module testmodule |
| 20 |
|
| 21 |
program main |
| 22 |
use testmodule |
| 23 |
type(evtlist_type), dimension(10) :: a |
| 24 |
end program main |
| 25 |
! { dg-final { scan-tree-dump-times "__builtin_free" 24 "original" } } |