Debian Codegraph @

gcc/testsuite/gfortran.dg/recursive_alloc_comp_6.f90

raw
1 ! { dg-do run }
2 !
3 ! Check that PR116669 is fixed now.
4 ! Contributed by Dominik Gronkiewicz <[email protected]>
5
6 program pr116669
7
8 implicit none (type, external)
9
10 type ast_expr_t
11 type(ast_opcall_t), allocatable :: op_call
12 end type
13
14 type ast_opcall_t
15 type(ast_expr_t), allocatable :: args(:)
16 end type
17
18 type(ast_opcall_t) :: o
19
20 allocate(o%args(2))
21 allocate(o%args(2)%op_call)
22 allocate(o%args(2)%op_call%args(3))
23
24 if (.NOT. allocated(o%args(2)%op_call%args)) stop 1
25
26 deallocate(o%args)
27 end program
28