After the recent changes for SVE vectors becoming usable as GNU vector 
extensions. You can now get
each of the elements like it was an array. There is no reason why taking the 
address of that
won't be invalid too. especially since we are limiting to the first N elements 
(where N is the
min arch supported elements for these types).
So this removes the error message on these 2 lines and fixes the testcase.

Pushed as obvious after a quick test for these tests for aarch64-linux-gnu.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c: Remove
        error message on taking address of an element of a vector.
        * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c: Likewise.

Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>
---
 .../gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c       | 2 +-
 .../gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c 
b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
index 7a7eb42f57b..32bb826e240 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
@@ -79,7 +79,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1,
   /* Vector indexing.  */
 
   sve_u1[0];
-  &sve_u1[0]; /* { dg-error {subscripted value is neither array nor pointer} } 
*/
+  &sve_u1[0];
 
   gnu_u1[0];
   &gnu_u1[0];
diff --git 
a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c 
b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c
index 2e92b0dd766..c311e162f9e 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c
@@ -78,7 +78,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1,
   /* Vector indexing.  */
 
   sve_u1[0];
-  &sve_u1[0]; /* { dg-error {subscripted value is neither array nor pointer} } 
*/
+  &sve_u1[0];
 
   gnu_u1[0];
   &gnu_u1[0];
-- 
2.43.0

Reply via email to