aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2023-11-06 15:53:55 +0000
committerRichard Earnshaw <rearnsha@arm.com>2023-11-13 14:15:56 +0000
commit511e5938d7cf640c403b27aa3ea32168c367c523 (patch)
tree8bb41284e7903d9a51d6bc7084eab0f05e890f63
parent5bc424925a3678d7821ab3512f49a66e98085768 (diff)
downloadgcc-511e5938d7cf640c403b27aa3ea32168c367c523.zip
gcc-511e5938d7cf640c403b27aa3ea32168c367c523.tar.gz
gcc-511e5938d7cf640c403b27aa3ea32168c367c523.tar.bz2
arm: testsuite: improve compatibility of gcc.target/arm/optional_thumb-*.c
These tests deliberately pass invalid option combinations to check that the compiler is generating the correct diagnostic. Nevertheless, we can improve their compatibility with other testsuite options. For optional_thumb-1.c we use a soft-float ABI, while for optional_thumb2.c we use arm_arch_v7em as the target architecture, then set the architecture manually. gcc/testsuite: * gcc.target/arm/optional_thumb-1.c: Force a soft-float ABI. * gcc.target/arm/optional_thumb-3.c: Check for armv7e-m compatibility, then set the architecture explicitly.
-rw-r--r--gcc/testsuite/gcc.target/arm/optional_thumb-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/optional_thumb-3.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c
index 99cb0c3..90d9ada 100644
--- a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c
+++ b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { ! default_mode } } } */
/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
-/* { dg-options "-march=armv6-m" } */
+/* { dg-options "-march=armv6-m -mfloat-abi=soft" } */
/* Check that -mthumb is not needed when compiling for a Thumb-only target. */
diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c
index d9150e0..a6c661ac 100644
--- a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c
+++ b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
-/* { dg-require-effective-target arm_cortex_m } */
+/* { dg-require-effective-target arm_arch_v7em_ok } */
/* { dg-skip-if "-mthumb given" { *-*-* } { "-mthumb" } } */
-/* { dg-options "-marm" } */
+/* { dg-options "-march=armv7e-m+fp -marm" } */
/* { dg-error "target CPU does not support ARM mode" "missing error with -marm on Thumb-only targets" { target *-*-* } 0 } */
/* Check that -marm gives an error when compiling for a Thumb-only target. */