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>
/* 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];
/* 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];