public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107815] 20_util/to_chars/float128_c++23.cc FAILs Date: Tue, 22 Nov 2022 17:22:19 +0000 [thread overview] Message-ID: <bug-107815-4-sg633Qf9R9@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107815-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107815 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #2) > > --- 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 ;-) Oops, sure. > > 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. This is weird. If line 66 is reached, fmt must be std::chars_format::fixed and in that case ptr1 - str1 should be 4933 and str1 should be that many chars long string starting with 11897314953572317650857593266280070161964690526416940455296988842121635797553123923249740128484620735259020335647491268597552654335738044626726987519452614908534619587250212628458657994054044935746815 If you get just 1e+4932 when asked for fixed format, something is just wrong, that is scientific or general format. > > > 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.
next prev parent reply other threads:[~2022-11-22 17:22 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-22 13:46 [Bug libstdc++/107815] New: " ro at gcc dot gnu.org 2022-11-22 13:47 ` [Bug libstdc++/107815] " ro at gcc dot gnu.org 2022-11-22 14:28 ` jakub at gcc dot gnu.org 2022-11-22 16:10 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-11-22 17:22 ` jakub at gcc dot gnu.org [this message] 2022-11-23 13:10 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-11-23 15:23 ` jakub at gcc dot gnu.org 2022-11-23 15:32 ` redi at gcc dot gnu.org 2022-11-23 15:45 ` jakub at gcc dot gnu.org 2022-11-23 15:58 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-11-23 16:07 ` jakub at gcc dot gnu.org 2022-11-24 9:03 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-11-24 9:16 ` jakub at gcc dot gnu.org 2022-11-24 9:38 ` cvs-commit at gcc dot gnu.org 2022-11-24 9:41 ` jakub at gcc dot gnu.org 2022-11-27 20:40 ` dave.anglin at bell dot net 2022-11-27 20:45 ` jakub at gcc dot gnu.org 2022-11-27 21:16 ` dave.anglin at bell dot net 2022-11-28 9:12 ` jakub at gcc dot gnu.org 2022-11-28 9:39 ` jakub at gcc dot gnu.org 2022-11-28 13:04 ` dave.anglin at bell dot net 2023-04-26 6:57 ` rguenth at gcc dot gnu.org 2023-06-09 12:24 ` redi at gcc dot gnu.org 2023-07-27 9:24 ` rguenth at gcc dot gnu.org 2024-05-21 9:13 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107815-4-sg633Qf9R9@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).