1!{ dg-do run }
2
3! Check fix for PR fortran/71623
4
5program allocatemvce
6  implicit none
7  character(len=:), allocatable :: string
8  integer, dimension(4), target :: array = [1,2,3,4]
9  integer, dimension(:), pointer :: array_ptr
10  array_ptr => array
11  ! The allocate used to segfault
12  allocate(character(len=size(array_ptr))::string)
13end program allocatemvce
14