Small problem in testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-[1-4].cc
Paolo Carlini
pcarlini@unitus.it
Tue Jul 1 20:00:00 GMT 2003
Pétur Runólfsson wrote:
>Hi Paolo,
>
>There is a small problem in the test cases for PR 11305. After this change:
>
>- wint_t n1 = fb.sputc(0x20000000);
>- wint_t n2 = fb.sputc(0x40000000);
>+ wfilebuf::int_type n1 = fb.sputc(L'i');
>+ wfilebuf::int_type n2 = fb.sputc(L'a');
>
>the test cases will no longer detect the presence of the bug.
>
>The problem was that overflow failed to convert characters whose UTF-8
>representation is larger than sizeof(wchar_t); 0x20000000 and 0x40000000
>are two such characters (6 bytes each) but L'i' and L'a' only require a
>single byte each ('i' and 'a').
>
>
Hummmm. However, for some reason the original testcase gave problems on
64 bit platforms, like x86-64:
11305-1.exe:
/usr/src/aj/cvs/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc:38:
void test01(): Assertion `n1 != (0xffffffffu)' failed.
FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-1.cc execution test
Any idea why?
We can try restoring only the sputc() argument of your original testcase
and see what happens...
Paolo.
More information about the Libstdc++
mailing list