3 ! Test the fix for PR69423.
5 ! Contributed by Antony Lewis <antony@cosmologist.info>
8 character(LEN
=:), allocatable
:: S
10 if (len(S
) .ne
. 4) call abort
11 if (S
.ne
. "test") call abort
12 if (allocated (S
)) deallocate (S
)
15 if (len(S
) .ne
. 4) call abort
16 if (S
.ne
. "test") call abort
17 if (allocated (S
)) deallocate (S
)
20 character(LEN
=:), allocatable
:: test
26 ! This line would print nothing when compiled with -O1 and higher.
27 ! print *, len(test),test
28 if (len(test
) .ne
. 4) call abort
29 if (test
.ne
. "test") call abort
32 function test2(alen
) result (test
)
33 character(LEN
=:), allocatable
:: test
39 ! This worked before the fix.
40 ! print *, len(test),test
41 if (len(test
) .ne
. 4) call abort
42 if (test
.ne
. "test") call abort