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

* 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_apinski@quicinc.com>
gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c

index 7a7eb42f57b12ca4a9a2259530fb3c494194c1c9..32bb826e24014042bcd250e5e0c6c3c943415639 100644 (file)
@@ -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];
index 2e92b0dd7662a0ff695aec334c98ee97f3b6d892..c311e162f9e085d87fb1021391e748b201822cfc 100644 (file)
@@ -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];