From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E333138560B6; Wed, 17 May 2023 19:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E333138560B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684351642; bh=erqDX1VFzOuYo1Mb6BnVmMDe0XI7s8uZgv40XrP5IlE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o/g2BXgR3aR3TadZUT8/agoDkfqKwEW8vgDdWjrVGTxakYy8E9ig9PGWT8gx0fwTo 0dxWcULb1c6uVLU+g2qsqoNgF3H+mp9KUeV3DQ8SyfbIKwfrGq9dJ2vlfQCPfaWac0 GefC3i7iZNHpHKcESbcWRnm5VS20jj+rcjRQ1B6U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109884] __builtin_Xq returns _Float128 instead of __float128 Date: Wed, 17 May 2023 19:27:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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=3D109884 --- Comment #10 from CVS Commits --- The releases/gcc-13 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:1ce8a5472f4fd98318b5f3575797b56b814b8ad9 commit r13-7340-g1ce8a5472f4fd98318b5f3575797b56b814b8ad9 Author: Jakub Jelinek Date: Wed May 17 20:59:54 2023 +0200 i386: Fix up types in __builtin_{inf,huge_val,nan{,s},fabs,copysign}q builtins [PR109884] When _Float128 support has been added to C++ for 13.1, float128t_type_= node tree has been added - in C float128_type_node and float128t_type_node is the same and represents both _Float128 and __float128, but in C++ they are distinct types which have different handling in the FEs. When doing that change, I mistakenly forgot to change FLOAT128 primitive type, which is used for the __builtin_{inf,huge_val,nan{,s},fabs,copysi= gn}q builtins results and some of their arguments (and nothing else). The following patch fixes that. On ia64 we already use float128t_type_node for those builtins, pa while it has __float128 that type is the same as long double and so those builtins have long double types and on powerpc seems we don't have these builti= ns but instead define macros which map them to __builtin_*f128. That will not work properly in C++, perhaps we should change those macros to be function-like and cast to __float128. 2023-05-17 Jakub Jelinek PR c++/109884 * config/i386/i386-builtin-types.def (FLOAT128): Use float128t_type_node rather than float128_type_node. * c-c++-common/pr109884.c: New test. (cherry picked from commit c8da62cfc6475c4b7213b2164c2c0ec8ea6d96b6)=