[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c++/107080] ICE in verify_symtab_nodes using _Float64x with long double
From:       "cvs-commit at gcc dot gnu.org via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date:       2022-09-30 19:55:52
Message-ID: bug-107080-4-ih4skg86Zd () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

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

https://gcc.gnu.org/g:61786edf7a82ffb4979207b43a8204ebc2a7671d

commit r13-2995-g61786edf7a82ffb4979207b43a8204ebc2a7671d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Sep 30 21:54:08 2022 +0200

    arm, csky: Fix C++ ICEs with _Float16 and __fp16 [PR107080]

    On Fri, Sep 30, 2022 at 09:54:49AM -0400, Jason Merrill wrote:
    > > Note, there is one further problem on aarch64/arm, types with HFmode
    > > (_Float16 and __fp16) are there mangled as Dh (which is standard
    > > Itanium mangling:
    > >                   ::= Dh # IEEE 754r half-precision floating point (16
bits)
    > >                   ::= DF <number> _ # ISO/IEC TS 18661 binary floating
point type _FloatN (N bits)
    > > so in theory is also ok, but DF16_ is more specific.  Should we just
    > > change Dh to DF16_ in those backends, or should __fp16 there be
distinct
    > > type from _Float16 where __fp16 would mangle Dh and _Float16 DF16_ ?
    >
    > You argued for keeping __float128 separate from _Float128, does the same
    > argument not apply to this case?

    Actually, they already were distinct types that just mangled the same.
    So the same issue that had to be solved on i?86, ia64 and rs6000 for
    _Float64x vs. long double is a problem on arm and aarch64 with _Float16
    vs. __fp16.
    The following patch fixes it for arm after aarch64 has been changed
    already before.

    > > And there is csky, which mangles __fp16 (but only if type's name is
__fp16,
    > > not _Float16) as __fp16, that looks clearly invalid to me as it isn't
    > > valid in the mangling grammar.  So perhaps just nuke csky's mangle_type
    > > and have it mangled as DF16_ by the generic code?

    And seems even on csky __fp16 is distinct type from _Float16 (which is a
    good thing for consistency, these 3 targets are the only ones that have
    __fp16 type), so instead the patch handles it the same as on arm/aarch64,
    Dh mangling for __fp16 and DF16_ for _Float16.

    2022-09-30  Jakub Jelinek  <jakub@redhat.com>

            PR c++/107080
            * config/arm/arm.cc (arm_mangle_type): Mangle just __fp16 as Dh
            and _Float16 as DF16_.
            * config/csky/csky.cc (csky_init_builtins): Fix a comment typo.
            (csky_mangle_type): Mangle __fp16 as Dh and _Float16 as DF16_
            rather than mangling __fp16 as __fp16.

            * g++.target/arm/pr107080.C: New test.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic