On 05/11/2024 20:28, Torbjörn SVENSSON wrote: > Changes since v1: > > - Changed from arm_neon to arm_arch_v7a for the required effective target. > > Ok for trunk and releases/gcc-14? > > -- > > Force armv7-a as the tests require a neon compatible architecture. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/attr-neon-builtin-fail.c: Use effective-target > arm_arch_v7a. > * gcc.target/arm/attr-neon-builtin-fail2.c: Likewise. > * gcc.target/arm/attr-neon-fp16.c: Likewise. > * gcc.target/arm/attr-neon2.c: Likewise. > > Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> > --- > gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c | 2 ++ > gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail2.c | 2 ++ > gcc/testsuite/gcc.target/arm/attr-neon-fp16.c | 2 ++ > gcc/testsuite/gcc.target/arm/attr-neon2.c | 2 ++ > 4 files changed, 8 insertions(+) > > diff --git a/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c > b/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c > index fb6e0b9cd66..46dc315aa09 100644 > --- a/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c > +++ b/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c > @@ -1,8 +1,10 @@ > /* Check that calling a neon builtin from a function compiled with vfp > fails. */ > /* { dg-do compile } */ > +/* { dg-require-effective-target arm_arch_v7a_ok } */ > /* { dg-require-effective-target arm_fp_ok } */ > /* { dg-require-effective-target arm_neon_ok } */
Do we really still need arm_fp_ok and arm_neon_ok? My feeling is that we don't. We certainly aren't adding (and don't want to add) any flags that these might have used when deciding that was acceptable. We might also need to add '-mfloat-abi=softfp' as well, with dg-additional-options, since otherwise the test will fail with a soft-float environment. > /* { dg-options "-O2" } */ > +/* { dg-add-options arm_arch_v7a } */ > /* { dg-add-options arm_fp } */ > > #include <arm_neon.h> > diff --git a/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail2.c > b/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail2.c > index 9cb5a2ebb90..75d75eaac3c 100644 > --- a/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail2.c > +++ b/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail2.c > @@ -1,7 +1,9 @@ > /* Check that calling a neon builtin from a function compiled with vfp > fails. */ > /* { dg-do compile } */ > +/* { dg-require-effective-target arm_arch_v7a_ok } */ > /* { dg-require-effective-target arm_vfp_ok } */ Same here. > /* { dg-options "-O2" } */ > +/* { dg-add-options arm_arch_v7a } */ > /* { dg-add-options arm_vfp } */ > > extern __simd64_int8_t a, b; > diff --git a/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c > b/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c > index d7b75645bc4..0021094354a 100644 > --- a/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c > +++ b/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c > @@ -1,7 +1,9 @@ > /* { dg-do compile } */ > /* { dg-skip-if "-mpure-code supports M-profile only and without Neon" { > *-*-* } { "-mpure-code" } } */ > +/* { dg-require-effective-target arm_arch_v7a_ok } */ > /* { dg-require-effective-target arm_fp_ok } */ and here. > /* { dg-options "-mfp16-format=ieee" } */ > +/* { dg-add-options arm_arch_v7a } */ > /* { dg-add-options arm_fp } */ > > #include "arm_neon.h" > diff --git a/gcc/testsuite/gcc.target/arm/attr-neon2.c > b/gcc/testsuite/gcc.target/arm/attr-neon2.c > index a7a72dac379..88fac710a7e 100644 > --- a/gcc/testsuite/gcc.target/arm/attr-neon2.c > +++ b/gcc/testsuite/gcc.target/arm/attr-neon2.c > @@ -1,7 +1,9 @@ > /* { dg-do compile } */ > +/* { dg-require-effective-target arm_arch_v7a_ok } */ > /* { dg-require-effective-target arm_neon_ok } */ > /* { dg-require-effective-target arm_fp_ok } */ and here. > /* { dg-options "-Ofast" } */ > +/* { dg-add-options arm_arch_v7a } */ > /* { dg-add-options arm_fp } */ arm_fp is incorrect now, it should be handled with arm_arch_v7a (plus the -mfloat-abi=softfp). > > /* Reset fpu to a value compatible with the next pragmas. */ R.