https://gcc.gnu.org/g:68b4d6bda8222cd48bde3bb2b15caac64938383f
commit r15-6161-g68b4d6bda8222cd48bde3bb2b15caac64938383f Author: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> Date: Sun Nov 10 20:46:47 2024 +0100 testsuite: arm: Use effective-target for pr56184.C and pr59985.C Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * g++.dg/other/pr56184.C: Use effective-target arm_arch_v7a_neon_thumb. * g++.dg/other/pr59985.C: Use effective-target arm_arch_v7a_fp_hard. * lib/target-supports.exp: Define effective-target arm_arch_v7a_fp_hard, arm_arch_v7a_neon_thumb Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> Diff: --- gcc/testsuite/g++.dg/other/pr56184.C | 7 +++++-- gcc/testsuite/g++.dg/other/pr59985.C | 7 ++++--- gcc/testsuite/lib/target-supports.exp | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/g++.dg/other/pr56184.C b/gcc/testsuite/g++.dg/other/pr56184.C index dc949283c988..b491f75bff7d 100644 --- a/gcc/testsuite/g++.dg/other/pr56184.C +++ b/gcc/testsuite/g++.dg/other/pr56184.C @@ -1,6 +1,9 @@ /* { dg-do compile { target arm*-*-* } } */ -/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ -/* { dg-options "-fno-short-enums -O2 -mthumb -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mtune=cortex-a9 -fno-section-anchors -Wno-return-type" } */ +/* { dg-require-effective-target arm_arch_v7a_neon_thumb_ok } */ +/* { dg-options "-fno-short-enums -O2 -fno-section-anchors -Wno-return-type" } */ +/* { dg-add-options arm_arch_v7a_neon_thumb } */ +/* { dg-additional-options "-mtune=cortex-a9" } */ + typedef unsigned int size_t; __extension__ typedef int __intptr_t; diff --git a/gcc/testsuite/g++.dg/other/pr59985.C b/gcc/testsuite/g++.dg/other/pr59985.C index 7c9bfab35f16..e96db4316331 100644 --- a/gcc/testsuite/g++.dg/other/pr59985.C +++ b/gcc/testsuite/g++.dg/other/pr59985.C @@ -1,7 +1,8 @@ /* { dg-do compile { target arm*-*-* } } */ -/* { dg-skip-if "incompatible options" { arm_thumb1 } } */ -/* { dg-options "-g -fcompare-debug -O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard" } */ -/* { dg-skip-if "need hardfp abi" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ +/* { dg-require-effective-target arm_arch_v7a_fp_hard_ok } */ +/* { dg-options "-g -fcompare-debug -O2" } */ +/* { dg-add-options arm_arch_v7a_fp_hard } */ +/* { dg-additional-options "-mtune=cortex-a9" } */ extern void *f1 (unsigned long, unsigned long); extern const struct line_map *f2 (void *, int, unsigned int, const char *, unsigned int); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ed2a597804a4..02eb8e5bee73 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5883,7 +5883,9 @@ foreach { armfunc armflag armdefs } { v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ v7a "-march=armv7-a+fp" __ARM_ARCH_7A__ v7a_arm "-march=armv7-a+fp -marm" "__ARM_ARCH_7A__ && !__thumb__" + v7a_fp_hard "-march=armv7-a+fp -mfpu=auto -mfloat-abi=hard" __ARM_ARCH_7A__ v7a_neon "-march=armv7-a+simd -mfpu=auto -mfloat-abi=softfp" "__ARM_ARCH_7A__ && __ARM_NEON__" + v7a_neon_thumb "-march=armv7-a+simd -mfpu=auto -mfloat-abi=softfp -mthumb" "__ARM_ARCH_7A__ && __ARM_NEON__ && __thumb__" v7r "-march=armv7-r+fp" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb -mfloat-abi=soft" __ARM_ARCH_7M__ v7em "-march=armv7e-m+fp -mthumb" __ARM_ARCH_7EM__