[fortran,patch] Forbid assignment of different character kinds

Tobias Burnus burnus@net-b.de
Sun Sep 28 14:18:00 GMT 2014

Hi FX,

FX wrote:
> When I added support for nondefault initial character kinds, I thought they could be assigned freely to each other. It turns out it’s not the case:

Am am vaguely remembering that some interpretation request/change now 
allows this.

And if I look at the current Fortran 2015 draft, I find

"For an intrinsic assignment statement where the variable is of type 
character, if expr has a different kind type parameter, each character c 
in expr is converted to the kind type parameterof the variable by 
ACHAR(IACHAR(c), KIND(variable))"

See http://j3-fortran.org/doc/year/14/14-007r2.pdf, " 
Interpretation of intrinsic assignments", paragraph 11.

I have rechecked Fortran 2008 (10-007) - and it has the same wording. It 
could be either already F2003 - added in some corrigendum or Fortran 
2008 – feel free to check the corrigenda: 


More information about the Gcc-patches mailing list