1! { dg-do run }
2!
3! Test the fix for PR71880 in which the string length for 'p'
4! was not set for the pointer assignment.
5!
6! Contributed by Valery Weber  <valeryweber@hotmail.com>
7!
8program t
9  character(:), dimension(:), allocatable, target :: c
10  character(:), dimension(:), pointer :: p => NULL ()
11  allocate(c, source = ['ABC','DEF','GHI'])
12  p => c
13  if (len(p) .ne. len (c)) stop 1
14  if (size (p, 1) .ne. size (c, 1)) stop 2
15  if (any (p .ne. c)) stop 3
16end program t
17