Dear Fortranners, conversions between different character kinds using TRANSFER exhibit inconsistencies that can occur between expr->representation.string (which is char*) on the one hand, and expr->->value.character.string. One issue (in target-memory.cc) is easily fixed by simply passing a conversion flag that was likely forgotten in the past. The other issue happens in gfc_copy_expr. Before we unconditionally converted an existing representation.string to wide char, which is definitely wrong. Restricting that code path to default character kind fixed the problems I could find and produces dumps that looked fine to me. Maybe some expert here can find a better fix. Regtested on x86_64-pc-linux-gnu. OK for mainline? Maybe 11-branch? Thanks, Harald