1! { dg-do run } 2! 3! Test fix for PR60795 comments #1 and #4 4! 5! Contributed by Kergonath <kergonath@me.com> 6! 7module m 8contains 9 subroutine allocate_array(s_array) 10 character(:), dimension(:), allocatable, intent(out) :: s_array 11 12 allocate(character(2) :: s_array(2)) 13 s_array = ["ab","cd"] 14 end subroutine 15end module 16 17program stringtest 18 use m 19 character(:), dimension(:), allocatable :: s4 20 character(:), dimension(:), allocatable :: s 21! Comment #1 22 allocate(character(1) :: s(10)) 23 if (size (s) .ne. 10) call abort 24 if (len (s) .ne. 1) call abort 25! Comment #4 26 call allocate_array(s4) 27 if (size (s4) .ne. 2) call abort 28 if (len (s4) .ne. 2) call abort 29 if (any (s4 .ne. ["ab", "cd"])) call abort 30 end program 31