aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_allocate_6.f08
blob: 2fdd4c128ef5923733ef7bcccce135623ed66ca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-do run }
! { dg-options "-fcoarray=single -fdump-tree-original" }

! Contributed by Tobias Burnus  <burnus@gcc.gnu.org>
! Test fix for pr65795.

implicit none

type t2
  integer, allocatable :: x
end type t2

type t3
  type(t2), allocatable :: caf[:]
end type t3

!type(t3), save, target :: c, d
type(t3), target :: c, d
integer :: stat

allocate(c%caf[*], stat=stat)
end

! Besides checking that the executable does not crash anymore, check
! that the cause has been remove.
! { dg-final { scan-tree-dump-not "c.caf.x = 0B" "original" } }