2 ! Wide chracter I/O test 2, formatted array write and read
3 ! Test case developed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 integer, parameter :: k4
=4
6 character(len
=7, kind
=k4
), dimension(3) :: mychar
7 character(50) :: buffer
8 mychar(1) = k4_
"abc1234"
9 mychar(2) = k4_
"def5678"
10 mychar(3) = k4_
"ghi9012"
12 write(buffer
,'(3(a))') mychar(2:3), mychar(1)
13 if (buffer
/= "def5678ghi9012abc1234") call abort
14 write(buffer
,'(3(a))') mychar
15 if (buffer
/= "abc1234def5678ghi9012") call abort
17 read(buffer
,'(3(a))') mychar
18 if (any(mychar
.ne
.[ k4_
"abc1234",k4_
"def5678",k4_
"ghi9012" ])) call abort