[Bug libfortran/52539] I/O: Wrong result for UTF-8/UCS-4 list-directed and namelist read and nml write

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Apr 27 11:38:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52539

--- Comment #13 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #12)
> ! { dg-do run }
[...]

Which is essentially the following.

-str = 4_'a'//char (int (z'4F60'),4)     &
+str = 4_'1a'//char (int (z'4F60'),4)     &

If that's sufficient to make the test case pass with a different endianness, it
is fine with me.

However, I do not understand why it should make a difference.

In general, I do not understand why there is an endian problem. "a" or "1a"
should simply lead to two 4-byte characters. The "int(z'4F60'),4)" should lead
to a single character, which depending on the endianness maps to a different
glyph. All characters should be convertable to UTF-8, which has no endianness
dependence, and convertable back to the original string - which one compares
to.



More information about the Gcc-bugs mailing list