On 11/21/24 15:24, Torbjörn SVENSSON wrote:
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>
---
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 dc949283c98..651c6280c35 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 "-mthumb -mtune=cortex-a9" } */
Isn't -mthumb already included by dg-add-options arm_arch_v7a_neon_thumb?
Thanks,
Christophe
+
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 7c9bfab35f1..e96db431633 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 f3828793986..e2c839b233a 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5777,7 +5777,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__