https://gcc.gnu.org/g:849172317a56bb35ceb34ed95a8cf86a661fdb79
commit r15-5841-g849172317a56bb35ceb34ed95a8cf86a661fdb79 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Sat Nov 30 21:04:10 2024 -0800 testsuite: Fix aarch64/sve/acle/general-c++/gnu_vectors_[12].C for taking address of vector element 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_apin...@quicinc.com> Diff: --- gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C | 2 +- gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C index 49b90492ce1c..cdd48cbc4544 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C @@ -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]; diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C index 2e9f688946f8..587d28d2363d 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C @@ -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];