diff options
author | Alexandre Oliva <oliva@adacore.com> | 2025-08-21 21:46:22 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2025-08-21 21:46:22 -0300 |
commit | d94eb26871d730d7f670a0d3367e976ecb05736a (patch) | |
tree | 410e65259945f9f43a42e2b69d711604a641899e | |
parent | c6d9b8023b8f2bbc52c5bd51e9c648fa096ed88a (diff) | |
download | gcc-d94eb26871d730d7f670a0d3367e976ecb05736a.zip gcc-d94eb26871d730d7f670a0d3367e976ecb05736a.tar.gz gcc-d94eb26871d730d7f670a0d3367e976ecb05736a.tar.bz2 |
[arm] require armv7 support for [PR120424]
Without stating the architecture version required by the test, test
runs with options that are incompatible with the required
architecture version fail, e.g. -mfloat-abi=hard.
armv7 was not covered by the long list of arm variants in
target-supports.exp, so add it, and use it for the effective target
requirement and for the option.
for gcc/testsuite/ChangeLog
PR rtl-optimization/120424
* lib/target-supports.exp (arm arches): Add arm_arch_v7.
* g++.target/arm/pr120424.C: Require armv7 support. Use
dg-add-options arm_arch_v7 instead of explicit -march=armv7.
-rw-r--r-- | gcc/testsuite/g++.target/arm/pr120424.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.target/arm/pr120424.C b/gcc/testsuite/g++.target/arm/pr120424.C index 4d0e490..40295ac 100644 --- a/gcc/testsuite/g++.target/arm/pr120424.C +++ b/gcc/testsuite/g++.target/arm/pr120424.C @@ -1,5 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv7 -O2 -fstack-clash-protection -fnon-call-exceptions" } */ +/* { dg-require-effective-target arm_arch_v7_ok } */ +/* { dg-options "-O2 -fstack-clash-protection -fnon-call-exceptions" } */ +/* { dg-add-options arm_arch_v7 } */ /* { dg-final { scan-assembler-not {#-8} } } */ /* LRA register elimination gets confused when register spilling causes arm_frame_pointer_required to switch from false to true, and diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index b49363c..2ab405a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6122,6 +6122,7 @@ foreach { armfunc armflag armdefs } { v6z_arm "-march=armv6z+fp -marm" "__ARM_ARCH_6Z__ && !__thumb__" v6z_thumb "-march=armv6z+fp -mthumb -mfloat-abi=softfp" "__ARM_ARCH_6Z__ && __thumb__" v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ + v7 "-march=armv7+fp" __ARM_ARCH_7__ 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__ |