Hi both,
On 20/01/2026 12:59, Alfie Richards wrote:
> Hi Wilco and all,
>
> I agree with your feedback. I have moved it to the sve subdirectory and added
> the ``/* { dg-do compile } */` for clarity.
>
> Okay for master?
> Alfie
>
> -- >8 --
>
> PR middle-end/123697
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/aarch64/sve/pr123697.c: New test.
> ---
> gcc/testsuite/gcc.target/aarch64/sve/pr123697.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr123697.c
>
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr123697.c
> b/gcc/testsuite/gcc.target/aarch64/sve/pr123697.c
> new file mode 100644
> index 00000000000..e4508512fc8
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/pr123697.c
> @@ -0,0 +1,13 @@
> +/* { dg-do compile } */
> +/* { dg-options "-msve-vector-bits=128 -mmax-vectorization -O3" } */
Is there a reason it isn't enough to add a line like the following:
/* { dg-additional-options "-march=armv9-a -msve-vector-bits=128
-mmax-vectorization" { target aarch64-*-* } } */
to the test that richi added, i.e. gcc/testsuite/gcc.dg/vect/vect-pr123697.c?
Thanks,
Alex
> +
> +struct a {
> + int c[2];
> +};
> +struct a d[3];
> +double f;
> +void g()
> +{
> + for (int e = 0; e < 3; ++e)
> + f += d[e].c[1];
> +}
> --
> 2.34.1
>