Le 23/01/2022 à 22:08, Harald Anlauf via Fortran a écrit :
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?
This was submitted on time before stage4, so it seems to remain valid.
OK.
Maybe 11-branch?
This is not a regression; I would rather not.
Thanks for the patch.