aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/deferred_character_17.f90
blob: 5a9d725d263594368f9a2748414009fa0cd360f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
!{ dg-do run }

! Check fix for PR fortran/71623

program allocatemvce
  implicit none
  character(len=:), allocatable :: string
  integer, dimension(4), target :: array = [1,2,3,4]
  integer, dimension(:), pointer :: array_ptr
  array_ptr => array
  ! The allocate used to segfault
  allocate(character(len=size(array_ptr))::string)
end program allocatemvce