https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110360
--- Comment #37 from anlauf at gcc dot gnu.org --- Created attachment 55661 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55661&action=edit Tentative patch for the bind(c) case The attached lightly-tested patch tries to fix (at least at the technical level) the issues exhibited in comment#33 for the calls to val_c. On x86 (LE) it fixes the 3rd case by dereferencing the temporary. For BE platforms it apparently used to work for the character literal only because it was internally converted to an integer(kind=1), so the patch now tries to achieve that for the other two cases. I am not too happy about the actual patch, because I do not yet see how to cleanly adapt it to the non-bind(c) case (val). But understanding the val_c case might be key to proceeding. BTW: the patch fixes a minor memleak in conv_scalar_char_value.