2 ! { dg-options "-fwhole-file" }
5 ! -fwhole-file flag added for PR fortran/44945
7 ! This test the fix of PR19107, where character array actual
8 ! arguments in derived type constructors caused an ICE.
9 ! It also checks that the scalar counterparts are OK.
10 ! Contributed by Paul Thomas pault@gcc.gnu.org
17 TYPE (dt
), DIMENSION(:), ALLOCATABLE
, SAVE :: c
19 program char_array_structure_constructor
22 if ((any (c
%a
/= "wxyz")) .OR
. &
23 (any (c
%b(1) /= "abcd")) .OR
. &
24 (any (c
%b(2) /= "efgh"))) call abort ()
28 ALLOCATE (c(n
), STAT
=IALLOC_FLAG
)
30 c (i
) = dt ("wxyz",(/"abcd","efgh"/))
33 END program char_array_structure_constructor