https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105844
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:b357af31b8d1e93f0f70133e25d3ad4045f7a32b commit r10-11389-gb357af31b8d1e93f0f70133e25d3ad4045f7a32b Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed May 3 21:40:01 2023 +0100 libstdc++: Ensure constexpr std::lcm detects out-of-range result [PR105844] On the gcc-10 branch, __glibcxx_assert does not unconditionally check the condition during constant evaluation. This means we need an explicit additional check for std::lcm results that cannot be represented in an unsigned result type. libstdc++-v3/ChangeLog: PR libstdc++/105844 * include/std/numeric (lcm): Ensure out-of-range result is detected in constant evaluation. * testsuite/26_numerics/lcm/105844.cc: Adjust dg-error string.