From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAAE1385771D; Wed, 3 May 2023 15:16:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAAE1385771D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683126991; bh=0NPE8E0SEl53bdEJ7uaAUmaCUwu0gEtSk7znwtZsNtA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ed56khVo49/YD8Au/PebT8o19fbt+t3sFboZKARKonK7N9KV0+oDT6yJtIjZcKiVR FbWrrQ9IVHbJXgFWu22fycJyRfkIA1/S8MfjBqULfHtKAECWOJj7FXelmJB6lkG7cy ca6jfpWEw4oWRlYzbauogKmILUPzEkkJf2IYD0Ao= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/105844] [10/11 Regression] std::lcm(50000, 49999) is UB but accepted in a constexpr due to cast to unsigned Date: Wed, 03 May 2023 15:16:31 +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: 12.1.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D105844 --- Comment #12 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:ad076469c00af1fbe2f848844ab5937587772a70 commit r11-10740-gad076469c00af1fbe2f848844ab5937587772a70 Author: Jonathan Wakely Date: Wed May 3 16:05:23 2023 +0100 libstdc++: Fix broken backport for std::lcm [PR105844] The backport for gcc-11 was incomplete and should have replaced all uses of std::__is_constant_evaluated with __builtin_is_constant_evaluated. We also need to prune some additional output for the new tests, because the r12-4425-g1595fe44e11a96 change to always prune those lines is not present on the branch. libstdc++-v3/ChangeLog: PR libstdc++/105844 * include/experimental/numeric (lcm): Use built-in instead of __is_constant_evaluated. * include/std/numeric (__abs_r, lcm): Likewise. * testsuite/26_numerics/gcd/105844.cc: Add dg-prune-output. * testsuite/26_numerics/lcm/105844.cc: Likewise.=