| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-fbackslash" } |
| 3 |
! Contributed by Tobias Burnus |
| 4 |
program test2 |
| 5 |
integer,parameter :: ucs4 = selected_char_kind("iso_10646") |
| 6 |
character(1,ucs4),parameter :: nen=char(int(z'5e74'),ucs4), & !year |
| 7 |
gatsu=char(int(z'6708'),kind=ucs4), & !month |
| 8 |
nichi=char(int(z'65e5'),kind=ucs4) !day |
| 9 |
character(25,ucs4) :: string |
| 10 |
open(10, encoding="utf-8", status="scratch") |
| 11 |
write(10,1) 2008,nen,8,gatsu,10,nichi |
| 12 |
1 format(i0,a,i0,a,i0,a) |
| 13 |
rewind(10) |
| 14 |
read(10,'(a)') string |
| 15 |
if (string /= ucs4_"2008\u5e748\u670810\u65e5") STOP 1 |
| 16 |
end program test2 |