coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / deferred_character_17.f90
blob5a9d725d263594368f9a2748414009fa0cd360f8
1 !{ dg-do run }
3 ! Check fix for PR fortran/71623
5 program 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)
13 end program allocatemvce