From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26CDC3858C29; Tue, 6 Feb 2024 21:09:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26CDC3858C29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707253781; bh=eQrqzswMiFHY90WkQmAvlcJJPiX7Og/p4IdZMONLWBE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bp8AAaE1ekGWGlXwAJPe3qUA3hKpAZRTtIyO0mQopBlvOPQP2VV+cBIYZII16BYda vRBwEhPtPL7Fr9ButTFAJQ4bUIt1S6RMjPJZzmARLtDZ1DjuU1gZunNcfb16wPcH02 i1TlnVQw4Odu7MX7sWIf82uFx9BiEZDl3jOQ8OSY= 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:09:39 +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: attachments.created 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 #1 from Jonathan Wakely --- Created attachment 57345 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57345&action=3Dedit Use 64-bit integers to do 128-bit arithmetic This patch defines a custom type that implements the necessary 128-bit arithmetic for linear_congruential_engine without __int128. It's an order of magnitude slower than using __int128 natively on x86_64, b= ut it gives the right results.=