From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9D8B386F009; Mon, 8 Mar 2021 17:42:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9D8B386F009 From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/98384] [11 Regression] new test case 20_util/to_chars/long_double.cc in r11-6249 fails on powerpc64 BE Date: Mon, 08 Mar 2021 17:42:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2021 17:42:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98384 --- Comment #24 from Patrick Palka --- (In reply to David Edelsohn from comment #23) > The AIX failure is: >=20 > printf_buffer=3D > 1. > 4426950408889633870046509400708600880000000000000000000000000000000000000= 0000 > 00000000000000000000000=20 >=20 > to_chars_buffer=3D > 1. > 4426950408889633870046509400708600878715515136718750000000000000000000000= 0000 > 00000000000000000000000??/?P00001. > 4426950408889633870046509400708600880000000000000000000000000000000000000= 0000 > 00000000000000000000000 >=20 > output_length=3D > 102 >=20 > ./long_double.cc:194: void test02(): Assertion '!memcmp(printf_buffer, > to_chars_buffer, output_length)' failed. I managed to reproduce this issue on AIX (gcc119). It looks like the %e/%f= /%g specifiers (as well as %Le/%Lf/%Lg -- long double is equivalent to double) never output more than 37 significant decimal digits on AIX. For e.g. printf("%.53e\n", 0x1.71547652b82fep+0); printf("%.0f\n", 0x1.249ad2594c37dp+332); x86 glibc printf outputs 1.44269504088896338700465094007086008787155151367187500e+00 =20 100000000000000001590289110975991804683608085639452813897813275577478387721= 70381060813469985856815104 and AIX printf outputs 1.44269504088896338700465094007086008800000000000000000e+00 =20 100000000000000001590289110975991804700000000000000000000000000000000000000= 00000000000000000000000000 It seems to me the output of AIX printf is wrong/nonconforming here..=