2 ! { dg-options "-fdump-tree-original" }
4 ! Check the fix for the testcase in comment 4, where the hidden string length
5 ! component of the array pointer component was not set.
7 ! Contributed by Sebastien Bardeau <bardeau@iram.fr>
11 character(len
=10), allocatable
, target
:: s(:)
12 character(len
=:), pointer :: sptr(:)
13 type :: pointer_typec0_t
14 character(len
=:), pointer :: data0
15 character(len
=:), pointer :: data1(:)
16 end type pointer_typec0_t
17 type(pointer_typec0_t
) :: co
28 if (any (sptr
.ne
. s
)) stop 1
29 if (co
%data0
.ne
. s(1)) stop 2
30 if (any (co
%data1
.ne
. s
)) stop 3 ! Hidden string length was not set
32 ! { dg-final { scan-tree-dump-times "co._data1_length = 10;" 1 "original" } }