https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107815
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > Can you please uncomment the > // std::cout << i << ' ' << std::string_view (str1, ptr1) << '\n'; > and > // std::cout << i << ' ' << std::string_view (str1, ptr5) << '\n'; > lines in the test, so that it is clear at least which test it is on? Sure. This is supposed to print u, I assume ;-) The line before the assertion failure is 1.18973e+4932 1e+4932 /vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc:66: void test(std::chars_format): Assertion 'ec2 == std::errc() && ptr2 - str2 == ptr1 - str1' failed. i.e. LDBL_MAX. > If line 66 fails, it is a fixed printing test trying to verify > that the string created by line 60 was actually the minimal. It doesn't now reliably: I compiled with -g3 -O0 to be able to check things with gdb if needed. > On SPARC Solaris, I assume long double is IEEE quad, and it is the shortest > version, so should use ryu library for both cases. It is, although only ever implemented in software. > Line 74 failure is about whether the created string can be read back, > in that case for IEEE quad fast_float library can't be used and so it should > use newlocale/uselocale/strtold/uselocale/freelocale, or if the OS doesn't > support newlocale/uselocale/freelocale most likely just strtod with lost > precision (so in that case the test would fail) on line 74. I'm not seeing the failure on l.74 any longer, even with the default optimization options. There has been an effort to introduce an xpg7 locale, but that had quite a number of unresolved issues (both on AIX and Solaris) and was never finished. Currently, we're stuck with generic.