public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107515] MVE: Generic functions do not accept _Float16 scalars
Date: Thu, 18 May 2023 10:43:37 +0000	[thread overview]
Message-ID: <bug-107515-4-5PN4JHQGyl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107515-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Stam Markianos-Wright
<stammark@gcc.gnu.org>:

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

commit r12-9608-gc7c4dfb5989e80ffc8e8439a8d9a9ed654612b90
Author: Stam Markianos-Wright <stam.markianos-wright@arm.com>
Date:   Mon Jan 16 11:40:40 2023 +0000

    arm: Split up MVE _Generic associations to prevent type clashes [PR107515]

    With these previous patches:
    https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606586.html
    https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606587.html
    we enabled the MVE overloaded _Generic associations to handle more
    scalar types, however at PR 107515 we found a new regression that
    wasn't detected in our testing:

    With glibc's posix/types.h:
    ```
    typedef signed int __int32_t;
    ...
    typedef __int32_t int32_t;
    ```
    We would get a `error: '_Generic' specifies two compatible types`
    from `__ARM_mve_coerce3` because of `type: param`, when `type` is
    `int` and `int32_t: param` both being the same under the hood.

    The same did not happen with Newlib's header sys/_stdint.h:
    ```
    typedef long int __int32_t;
    ...
    typedef __int32_t int32_t ;
    ```
    which worked fine, because it uses `long int`.

    The same could feasibly happen in `__ARM_mve_coerce2` between
    `__fp16` and `float16_t`.

    The solution here is to break the _Generic down so that the similar
    types don't appear at the same level, as is done in `__ARM_mve_typeid`

    gcc/ChangeLog:
            PR target/96795
            PR target/107515
            * config/arm/arm_mve.h (__ARM_mve_coerce2): Split types.
            (__ARM_mve_coerce3): Likewise.

    gcc/testsuite/ChangeLog:
            PR target/96795
            PR target/107515
            * gcc.target/arm/mve/intrinsics/mve_intrinsic_type_overloads-fp.c:
New test.
            * gcc.target/arm/mve/intrinsics/mve_intrinsic_type_overloads-int.c:
New test.

    (cherry picked from commit 8a1360e72d6c6056606aa5edd8c906c50f26de59)

  parent reply	other threads:[~2023-05-18 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03  9:27 [Bug target/107515] New: " kevin.bracey at alifsemi dot com
2022-11-10 17:30 ` [Bug target/107515] " stammark at gcc dot gnu.org
2022-11-16 16:35 ` kevin.bracey at alifsemi dot com
2022-11-17 16:56 ` stammark at gcc dot gnu.org
2022-11-21 12:24 ` kevin.bracey at alifsemi dot com
2022-11-28  9:12 ` cvs-commit at gcc dot gnu.org
2022-11-29  8:59 ` kevin.bracey at alifsemi dot com
2022-11-29 13:23 ` stammark at gcc dot gnu.org
2022-11-29 13:29 ` kevin.bracey at alifsemi dot com
2022-12-01 18:37 ` stammark at gcc dot gnu.org
2023-01-16 12:52 ` cvs-commit at gcc dot gnu.org
2023-05-18 10:39 ` cvs-commit at gcc dot gnu.org
2023-05-18 10:43 ` cvs-commit at gcc dot gnu.org [this message]
2023-05-18 11:06 ` stammark at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107515-4-5PN4JHQGyl@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).