From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C07183858415; Tue, 6 Feb 2024 21:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C07183858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707254515; bh=3OQ4Lndpebdow3jPFGt6KYFCdMFuV/MASsL35On6rhE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cd6f12+WVoxTX7oaLtRbJ3OKDMumr2wIK/biAOuJH6wue5Rkwj5OPBDE7ty9tt8Me fhNEvc4AYi+jC4G1Bal8ODA4rIt3xwViOt2fELTU/oJ9cunV2pt1J2KMrxBoNhO7kY 0BgKszGGttyhl9i1G7JM1D9EBi55bvvS3TjLFlV8= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/87744] Some valid instantiations of linear_congruential_engine produce compiler errors when __int128 isn't available Date: Tue, 06 Feb 2024 21:21:55 +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: 7.3.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87744 --- Comment #2 from Jonathan Wakely --- (In reply to Lewis Fox from comment #0) > libc++'s > implementation of linear_congruential_engine (though libc++ incorrectly u= ses > Schrage's method). I haven't checked what libc++ actually does, but it gives consistent results for -m32 and -m64. However, apart from the first one, its results don't mat= ch what libstdc++'s. Libstdc++ and Boost give the same results: 864691128455147579 20120904253298372 499698276788149646 1283859513473858339 2211358525164835637 1565794316594927048 433037752037085551 3876224293909804757 842334705173512733 614226679431558764 3068544072891686009 780734117187050918 1963664848033545542 3791874062716605653 366668634810437006 1377239172204792920 1808622055437870614 464217244571328665 2604268511046649463 2831603438105397950 3223716036697852745 784694016100218461 1453099037541982349 2259076772827085306 2590915097279144408 3831773502251465123 320081643915990134 2376324005742734684 2037587339862127157 893313058057432898 118956510249458009 973816490706440657 2982490375421836301 1236945357523402079 3905294429470053119 2304284986302062495 2454379621599061616 1553811809817066890 2904663527490058979 2904663527490058979 2904663527490058979 2904663527490058979 2904663527490058979 2904663527490058979 2904663527490058979 etc. Libc++ gets stuck oscillating between two values right away: 864691128455147579 1965622972376959002 4035225266123976763 1965622972376959002 4035225266123976763 1965622972376959002 4035225266123976763 1965622972376959002 4035225266123976763 1965622972376959002 4035225266123976763 1965622972376959002 4035225266123976763 1965622972376959002=