Debian Codegraph @

gcc/testsuite/gfortran.dg/alloc_comp_constructor_7.f90

raw
1 ! { dg-do run }
2 !
3 ! PR 60357: [F08] structure constructor with unspecified values for allocatable components
4 !
5 ! Contributed by Antony Lewis <[email protected]>
6
7 Type A
8 integer :: X = 1
9 integer, allocatable :: y
10 integer, allocatable :: z(:)
11 end type
12
13 Type(A) :: Me = A(X=1)
14
15 if (allocated(Me%y)) STOP 1
16 if (allocated(Me%z)) STOP 2
17
18 end