From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 70BEE3856DC7; Wed, 17 May 2023 12:41:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70BEE3856DC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684327296; bh=C/1RPff9YrJroBaqX+jXd5czpWxd2ed4YOG3u7vjebU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RCpeyfEZy+ESK7eCVl9XPfDIhl5R+IAsRqJkNj4YlhoGtzikHWuXeqSTHHvMr+qPC f3xGATxkdEZzkGFr/yOtCN2KI8AHdlsuqR4jzvKZrtzO2+idWKO0981tE4nsWRLDyy hjmgdtOqzG98ooa2UPHLlKNh95otThjF3IZFs+ew= From: "matt at mattborland dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109883] Stack Overflow in functions with types and -std=c++23 Date: Wed, 17 May 2023 12:41:36 +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: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: matt at mattborland dot com 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=3D109883 --- Comment #6 from Matt Borland --- (In reply to Xi Ruoyao from comment #4) > It seems the function >=20 > __gnu_cxx::__promote_2 std::__is_integer<_Float64>::__value>::__type)(0))+((__gnu_cxx:: > __promote_2<_Float64, std::__is_integer<_Float64>::__value>::__type)(0))), > std::__is_integer std::__is_integer<_Float64>::__value>::__type)(0))+((__gnu_cxx:: > __promote_2<_Float64, > std::__is_integer<_Float64>::__value>::__type)(0)))>::__value>::__type > std::pow<_Float64, _Float64>(_Float64, _Float64) >=20 > is recursing infinitely. For Boost.Math's implementation of promote_2 we found template specializati= ons to be effective: https://github.com/boostorg/math/pull/978/files#diff-2463d99030329b154489b8= b34ce1068a34e736cab268c3421b058ca0e516680cR189.=