lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / deferred_character_4.f90
blob98a30b48e9facb41486a7ff8b518f61e222d4abb
1 ! { dg-do run }
3 ! Check that PR50221 comment #4 is fixed.
5 ! Contributed by Arjen Makus <arjen.markus895@gmail.com>
7 program chk_alloc_string
8 implicit none
10 character(len=:), dimension(:), allocatable :: strings
11 character(20) :: buffer
12 integer :: i
14 allocate( character(10):: strings(1:3) )
16 strings = [ "A ", "C ", "ABCD", "V " ]
18 if (len(strings) .ne. 4) STOP 1
19 if (size(strings, 1) .ne. 4) STOP 2
20 if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V"])) STOP 3
22 strings = [character(len=4) :: "A", "C", "ABCDE", "V", "zzzz"]
24 if (len(strings) .ne. 4) STOP 4
25 if (size(strings, 1) .ne. 5) STOP 5
26 if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V", "zzzz"])) STOP 6
28 write (buffer, "(5a4)") strings
29 if (buffer .ne. "A C ABCDV zzzz") STOP 7
30 end program chk_alloc_string