public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kevin.bracey at alifsemi dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107515] New: MVE: Generic functions do not accept _Float16 scalars
Date: Thu, 03 Nov 2022 09:27:56 +0000	[thread overview]
Message-ID: <bug-107515-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107515
           Summary: MVE: Generic functions do not accept _Float16 scalars
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kevin.bracey at alifsemi dot com
  Target Milestone: ---

Compiling C code, generic functions taking floating point scalars in arm_mve.h
do not accept `_Float16` values.

// Using gcc -mcpu=cortex-m55 -O2
// Uploaded at https://godbolt.org/z/7jrqWWroY

#include <arm_mve.h>

void test(void)
{
    float16x8_t x;

    x = vmulq(x, 0.5); // ok
    x = vmulq(x, 0.5f); // ok
    x = vmulq(x, (__fp16) 0.5); // ok
    x = vmulq(x, 0.15f16); // rejected
    x = vmulq(x, (_Float16) 0.15); // rejected
}

Output:

<source>:10:9: error: '_Generic' selector of type 'int (*)[4][39]' is not
compatible with any association
   10 |     x = vmulq(x, 0.15f16); // rejected
      |         ^~~~~
<source>:11:9: error: '_Generic' selector of type 'int (*)[4][39]' is not
compatible with any association
   11 |     x = vmulq(x, (_Float16) 0.15); // rejected
      |         ^~~~~

             reply	other threads:[~2022-11-03  9:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03  9:27 kevin.bracey at alifsemi dot com [this message]
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
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@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).