3 ! Check the fix for PR34955 in which three bytes would be copied
4 ! from bytes by TRANSFER, instead of the required two and the
5 ! resulting string length would be incorrect.
7 ! Contributed by Dominique Dhumieres <dominiq@lps.ens.fr>
9 character(len
= 1) :: string
= "z"
10 character(len
= 20) :: tmp
= ""
11 tmp
= Upper ("abcdefgh")
12 if (trim(tmp
) .ne
. "ab") STOP 1
14 Character (len
= 20) Function Upper (string
)
15 Character(len
= *) string
17 i
= size (transfer (string
,"xy",len (string
)))
18 if (i
/= len (string
)) STOP 2
21 transfer (merge (transfer (string
,"xy",len (string
)), &
22 string(1:2), .true
.), "xy")