https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109884

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:c8da62cfc6475c4b7213b2164c2c0ec8ea6d96b6

commit r14-944-gc8da62cfc6475c4b7213b2164c2c0ec8ea6d96b6
Author: Jakub Jelinek <ja...@redhat.com>
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,copysign}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 builtins
    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  <ja...@redhat.com>

            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.

Reply via email to