]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix aarch64/sve/acle/general-c++/gnu_vectors_[12].C for taking address...
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 1 Dec 2024 05:04:10 +0000 (21:04 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Sun, 1 Dec 2024 05:04:10 +0000 (21:04 -0800)
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:

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

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C
gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C

index 49b90492ce1c953290aa156f8cbef2aa3ca11e05..cdd48cbc45442a6ca66bb44e3e3603e59894e1a2 100644 (file)
@@ -115,7 +115,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];
index 2e9f688946f81a949d54498df37278a84069f433..587d28d2363d6686828b43aacd6427048c2a658f 100644 (file)
@@ -115,7 +115,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];