public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors
@ 2021-04-26 15:33 rsandifo at gcc dot gnu.org
  2021-04-26 15:33 ` [Bug target/100270] " rsandifo at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-26 15:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100270
           Summary: _Generic can't distinguish VLS SVE vectors and GNU
                    vectors
           Product: gcc
           Version: 10.3.1
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

Compiling the following test with -march=armv8.2-a+sve -msve-vector-bits=256:

---------------------------------------------------------------------------
#include <arm_sve.h>

typedef svint32_t vls_svint32_t __attribute__((arm_sve_vector_bits(256)));
typedef int32_t gnu_svint32_t __attribute__((vector_size(32)));

int
f (vls_svint32_t x)
{
  return _Generic(x, vls_svint32_t: 1, gnu_svint32_t: 2, default: -1);
}
---------------------------------------------------------------------------

gives:

a.c: In function ‘f’:
a.c:9:40: error: ‘_Generic’ specifies two compatible types
    9 |   return _Generic(x, vls_svint32_t: 1, gnu_svint32_t: 2, default: -1);
      |                                        ^~~~~~~~~~~~~
a.c:9:22: note: compatible type is here
    9 |   return _Generic(x, vls_svint32_t: 1, gnu_svint32_t: 2, default: -1);
      |                      ^~~~~~~~~~~~~
a.c:9:40: error: ‘_Generic’ selector matches multiple associations
    9 |   return _Generic(x, vls_svint32_t: 1, gnu_svint32_t: 2, default: -1);
      |                                        ^~~~~~~~~~~~~
a.c:9:22: note: other match is here
    9 |   return _Generic(x, vls_svint32_t: 1, gnu_svint32_t: 2, default: -1);
      |                      ^~~~~~~~~~~~~

This is because aarch64_comp_type_attributes needs to return
false for this combination of types.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100270] _Generic can't distinguish VLS SVE vectors and GNU vectors
  2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
@ 2021-04-26 15:33 ` rsandifo at gcc dot gnu.org
  2021-04-27 11:18 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-26 15:33 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-04-26
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Working on a patch.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100270] _Generic can't distinguish VLS SVE vectors and GNU vectors
  2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
  2021-04-26 15:33 ` [Bug target/100270] " rsandifo at gcc dot gnu.org
@ 2021-04-27 11:18 ` cvs-commit at gcc dot gnu.org
  2021-04-27 11:21 ` [Bug target/100270] [10/11 Backport] " rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 11:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:4cea5b8cb715e40e10174e6de405f26202fa3d6a

commit r12-147-g4cea5b8cb715e40e10174e6de405f26202fa3d6a
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Tue Apr 27 12:18:03 2021 +0100

    aarch64: Handle SVE attributes in comp_type_attributes [PR100270]

    Even though "SVE type" and "SVE sizeless type" are marked as
    affecting type identity, the middle end doesn't truly believe
    it unless we also handle them in comp_type_attributes.

    gcc/
            PR target/100270
            * config/aarch64/aarch64.c (aarch64_comp_type_attributes): Handle
            SVE attributes.

    gcc/testsuite/
            PR target/100270
            * gcc.target/aarch64/sve/acle/general-c/pr100270_1.c: New test.
            * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Change
            expected error message when subtracting pointers to different
            vector types.  Expect warnings when mixing them elsewhere.
            * gcc.target/aarch64/sve/acle/general/attributes_7.c: Remove
            XFAILs.  Tweak error messages for some cases.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100270] [10/11 Backport] _Generic can't distinguish VLS SVE vectors and GNU vectors
  2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
  2021-04-26 15:33 ` [Bug target/100270] " rsandifo at gcc dot gnu.org
  2021-04-27 11:18 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 11:21 ` rsandifo at gcc dot gnu.org
  2021-04-29  8:28 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-27 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100270] [10/11 Backport] _Generic can't distinguish VLS SVE vectors and GNU vectors
  2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-04-27 11:21 ` [Bug target/100270] [10/11 Backport] " rsandifo at gcc dot gnu.org
@ 2021-04-29  8:28 ` cvs-commit at gcc dot gnu.org
  2022-06-28 10:44 ` [Bug target/100270] [10 " jakub at gcc dot gnu.org
  2023-07-07  9:38 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-29  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

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

commit r11-8322-gdfaa29b5441689ce05e3c09012d3afe269770e94
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Apr 29 09:27:51 2021 +0100

    aarch64: Handle SVE attributes in comp_type_attributes [PR100270]

    Even though "SVE type" and "SVE sizeless type" are marked as
    affecting type identity, the middle end doesn't truly believe
    it unless we also handle them in comp_type_attributes.

    gcc/
            PR target/100270
            * config/aarch64/aarch64.c (aarch64_comp_type_attributes): Handle
            SVE attributes.

    gcc/testsuite/
            PR target/100270
            * gcc.target/aarch64/sve/acle/general-c/pr100270_1.c: New test.
            * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Change
            expected error message when subtracting pointers to different
            vector types.  Expect warnings when mixing them elsewhere.
            * gcc.target/aarch64/sve/acle/general/attributes_7.c: Remove
            XFAILs.  Tweak error messages for some cases.

    (cherry picked from commit 4cea5b8cb715e40e10174e6de405f26202fa3d6a)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100270] [10 Backport] _Generic can't distinguish VLS SVE vectors and GNU vectors
  2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-04-29  8:28 ` cvs-commit at gcc dot gnu.org
@ 2022-06-28 10:44 ` jakub at gcc dot gnu.org
  2023-07-07  9:38 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100270] [10 Backport] _Generic can't distinguish VLS SVE vectors and GNU vectors
  2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-06-28 10:44 ` [Bug target/100270] [10 " jakub at gcc dot gnu.org
@ 2023-07-07  9:38 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.5.0
   Target Milestone|10.5                        |11.2
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-07  9:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 15:33 [Bug target/100270] New: _Generic can't distinguish VLS SVE vectors and GNU vectors rsandifo at gcc dot gnu.org
2021-04-26 15:33 ` [Bug target/100270] " rsandifo at gcc dot gnu.org
2021-04-27 11:18 ` cvs-commit at gcc dot gnu.org
2021-04-27 11:21 ` [Bug target/100270] [10/11 Backport] " rsandifo at gcc dot gnu.org
2021-04-29  8:28 ` cvs-commit at gcc dot gnu.org
2022-06-28 10:44 ` [Bug target/100270] [10 " jakub at gcc dot gnu.org
2023-07-07  9:38 ` rguenth at gcc dot gnu.org

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).