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