re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic_pack_5.f90
blobd0d2e2be19f11c198f64be370596252c2059c28d
1 ! { dg-do run }
3 ! PR 41478: Corrupted memory using PACK for derived-types with allocated components
4 ! PR 42268: [4.4/4.5 Regression] derived type segfault with pack
6 ! Original test case by Juergen Reuter <reuter@physik.uni-freiburg.de>
7 ! Modified by Janus Weil <janus@gcc.gnu.org>
9 type :: container_t
10 integer:: entry = -1
11 end type container_t
12 type(container_t), dimension(1) :: a1, a2
13 a2(1)%entry = 1
14 a1 = pack (a2, mask = [.true.])
15 if (a1(1)%entry/=1) STOP 1
16 end