Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> writes: > On Sat, 27 Jan 2024 at 21:19, Richard Sandiford > <richard.sandif...@arm.com> wrote: >> >> Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> writes: >> > Hi, >> > The test passes -mlittle-endian option but doesn't have target check >> > for aarch64_little_endian and thus fails to compile on >> > aarch64_be-linux-gnu. The patch adds the missing aarch64_little_endian >> > target check, which makes it unsupported on the target. >> > OK to commit ? >> > >> > Thanks, >> > Prathamesh >> > >> > PR112950: Add aarch64_little_endian target check for dupq_5.c >> > >> > gcc/testsuite/ChangeLog: >> > PR target/112950 >> > * gcc.target/aarch64/sve/acle/general/dupq_5.c: Add >> > aarch64_little_endian target check. >> >> If we add this requirement, then there's no need to pass -mlittle-endian >> in the dg-options. >> >> But dupq_6.c (the corresponding big-endian test) has: >> >> /* To avoid needing big-endian header files. */ >> #pragma GCC aarch64 "arm_sve.h" >> >> instead of: >> >> #include <arm_sve.h> >> >> Could you do the same thing here? > That worked, thanks! And it also makes dupq_5.c pass on aarch64_be-linux-gnu. > > Thanks, > Prathamesh > >> >> Thanks, >> Richard >> >> > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c >> > b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c >> > index 6ae8d4c60b2..1990412d0e5 100644 >> > --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c >> > +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c >> > @@ -1,5 +1,6 @@ >> > /* { dg-do compile } */ >> > /* { dg-options "-O2 -mlittle-endian" } */ >> > +/* { dg-require-effective-target aarch64_little_endian } */ >> > >> > #include <arm_sve.h> >> > > > PR112950: Use #pragma GCC for including arm_sve.h. > > gcc/testsuite/ChangeLog: > PR target/112950 > * gcc.target/aarch64/sve/acle/general/dupq_5.c: Remove include directive > and instead use #pragma GCC for including arm_sve.h.
OK, thanks. Richard > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c > b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c > index 6ae8d4c60b2..e88477b6379 100644 > --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c > +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c > @@ -1,7 +1,7 @@ > /* { dg-do compile } */ > /* { dg-options "-O2 -mlittle-endian" } */ > > -#include <arm_sve.h> > +#pragma GCC aarch64 "arm_sve.h" > > svint32_t > dupq (int x1, int x2, int x3, int x4)