On 10 July 2015 at 09:14, Christian Bruel <christian.br...@st.com> wrote: > > On 07/09/2015 05:39 PM, Christophe Lyon wrote: >> Some multilibs do not support Thumb mode on ARM targets. This is the >> case for instance when target is arm-linux-gnueabihf and with >> -march=armv5-t: Thumb-1 hard-float VFP ABI is not implemented. >> >> In this configuration, gcc.target/arm/attr_thumb.c is failing because >> we switch thumb mode via an attribute. >> >> This patch makes this test unsupported, by adding a new function in >> lib/target-supports.exp: check_effective_target_arm_thumb_ok. >> >> OK? >> > > What about just skip-if { ! { arm_thumb1_ok || arm_thumb2_ok } } , for > consistency with the other tests using -mthumb ? OK, let's be consistent.
> Can you add the same check to flip-thumb.c as well (must have been also FAIL > for your configuration) ? Indeed, I noticed it when you added that test, then forgot to merge both fixes. > thanks > > Christian > 2015-07-10 Christophe Lyon <christophe.l...@linaro.org> * gcc.target/arm/attr_thumb.c: Skip if Thumb is not supported. * gcc.target/arm/flip-thumb.c: Likewise. diff --git a/gcc/testsuite/gcc.target/arm/attr_thumb.c b/gcc/testsuite/gcc.target/arm/attr_thumb.c index 02ddfda..eac4713 100644 --- a/gcc/testsuite/gcc.target/arm/attr_thumb.c +++ b/gcc/testsuite/gcc.target/arm/attr_thumb.c @@ -1,5 +1,7 @@ /* Check that attribute target thumb is recognized. */ /* { dg-do compile } */ +/* Make sure the current multilib supports thumb. */ +/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ /* { dg-options "-O2 -mno-restrict-it" } */ /* { dg-final { scan-assembler-not "\\.arm" } } */ /* { dg-final { scan-assembler "\\.thumb_func" } } */ diff --git a/gcc/testsuite/gcc.target/arm/flip-thumb.c b/gcc/testsuite/gcc.target/arm/flip-thumb.c index 9154799..355d663 100644 --- a/gcc/testsuite/gcc.target/arm/flip-thumb.c +++ b/gcc/testsuite/gcc.target/arm/flip-thumb.c @@ -1,5 +1,7 @@ /* Check -mflip-thumb. */ /* { dg-do compile } */ +/* Make sure the current multilib supports thumb. */ +/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ /* { dg-options "-O2 -mflip-thumb -mno-restrict-it" } */ /* { dg-final { scan-assembler "\\.arm" } } */ /* { dg-final { scan-assembler-times "\\.thumb_func" 1} } */