From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F2502385841D; Tue, 6 Feb 2024 22:12:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2502385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707257535; bh=w2rnOy2Lly9cIoKMrlBr4I6CmeJlS75jV2v8bHrLMdE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hHoYtWmvHOHuhhXMUIBdIJMkj8+aL8BaHX4cbVNB9eenDqKgaiZ/GZvMUqGkELv8W qSKlgbTV6lUeoTYTZOfEj+fWeTGWZ8Dp6mCPbWnl+4+NheJd0YKDzqRyQ93vQZjsrM /zNDclHDImi/8gLCQ7IpEJ5hcch0aaBhAkc5Zq64= From: "jakub 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 22:12:15 +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: jakub 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #10 from Jakub Jelinek --- As discussed on IRC, probably the if (!__builtin_mul_overflow(__l._M_lo, __x, &__lo)) optimization isn't a good idea, because most likely the compiler will in th= at case expand that to a full 64x64->128 multiplication plus testing that the upper= 64 bits are or aren't zero, so computing everything this function needs and do= ing it again if there is overflow, without possibility to query what it compute= d.=