https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65144
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-03-01 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- AFAICT the substring problem occurs for PARAMETER only: program test3 INTEGER,PARAMETER :: ucs4 = selected_char_kind("ISO_10646") CHARACTER(3,UCS4),PARAMETER :: unip=CHAR(INT(Z'5e74'),UCS4)//CHAR(INT(Z'6708'),ucs4)//CHAR(INT(Z'65e5'),ucs4) character(3,UCS4) :: uni uni = unip open(6, encoding="utf-8") print *, uni print *, uni(2:2) print *, unip print *, "'",unip(1:1),"'" end program test3 gives at run time 年月日 月 年月日 't'