From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C7EAC385828A; Thu, 4 Jan 2024 00:59:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7EAC385828A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704329947; bh=/dTYryCCZnh45eHwy6kfWBZZ1fzpYcmu9ls8N8LVzaM=; h=From:To:Subject:Date:From; b=DmCptrh6FN7j1hRfKdQLhAo4SXQNa5/O+c1o0dUc2iSf75BsV3nh4FFXIS1Q00Ya9 Hy24+02OjKK1G/wVyUhNdbVRKBEHsA2TyhBixW81aRIEY9YiSK0N3bhmRupYTJ5Rfb odV021xN8eC/60yMjMq5eVniSNSCZwzZXwVAyByg= From: "hp at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 Date: Thu, 04 Jan 2024 00:59:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hp at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113226 Bug ID: 113226 Summary: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: hp at gcc dot gnu.org Target Milestone: --- After r14-6888-ga138b99646a555, I see, for cris-elf (32-bit target, no 128b= it): FAIL: std/ranges/iota/max_size_type.cc -std=3Dgnu++20 execution test FAIL: std/ranges/iota/max_size_type.cc -std=3Dgnu++26 execution test And in the .log: spawn cris-elf-run ./max_size_type.exe^ Inconsistency found: 1 0 -100 -100^ /x/gcc/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc:246: void test02() [with bool signed_p =3D true; bool shorten_p =3D false]: Assertion= '0' failed. program stopped with signal 6 (Aborted). FAIL: std/ranges/iota/max_size_type.cc -std=3Dgnu++20 execution test Changing all s/ok &=3D/VERIFY/ (plus adding one level of parentheses to one= of the lines) show: /x/gcc/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc:217: void test02() [with bool signed_p =3D true; bool shorten_p =3D false]: Assertion= 'i*j =3D=3D shorten_type(max_type(i)*j)' failed. program stopped with signal 6 (Aborted). Further instrumentation, adding among other lines: ``` if (signed_p && ! shorten_p) std::cerr << "j =3D=3D " << int64_t(j) << std::endl; if (!(i*j =3D=3D shorten_type(max_type(i)*j))) { std::cerr << "i =3D=3D " << int64_t(i) << ", j =3D=3D " << j = << ", i*j =3D=3D " << int64_t(i*j) << ", max_type(i) =3D=3D \ " << int64_t(max_type(i)); std::cerr << ", max_type(i)*j =3D=3D " << int64_t(max_type(i)= *j) << std::endl; } '''=20 shows that this is (see above for template parameters): i =3D=3D 1, j =3D=3D -100, i*j =3D=3D 4294967196, max_type(i) =3D=3D 1, max= _type(i)*j =3D=3D -100 and that large number is as you might guess, (unsigned) -100. Not sure if this is a bug in the testcase or elsewhere, but I'll start my guessing with testsuite.=