Hi Richard,

On 21 September 2012 10:49, Richard Earnshaw <rearn...@arm.com> wrote:
> On 21/09/12 09:47, Matthew Gretton-Dann wrote:
>> On 20 September 2012 23:06, Christophe Lyon <christophe.l...@linaro.org> 
>> wrote:
>>> Hi,
>>>
>>> GCC for ARM does not support compiling in Thumb1 mode  and
>>> float-abi=hard.  But  it does not fail unless the program being
>>> compiled actually contains a function with parameters and/or a return
>>> value.
>>>
>>> This is a (minor) problem in the testsuite in some configurations.
>>>
>>> For instance, if I run the testsuite forcing -mthumb (via site.exp)
>>> for a GCC configured for float-abi=hard, and a test uses
>>> /* { dg-require-effective-target arm_arch_v6_ok } */
>>> /* { dg-add-options arm_arch_v6 } */
>>>
>>> it won't be unresolved since effective-target arm_arch_v6_ok is successful.
>>>
>>> The attached patch adds a dummy function body in the test such that it 
>>> fails.
>>>
>>> Another way of achieving the same result is by making sure that the
>>> relevant tests use
>>> arm_arch_v6_multilib
>>> instead of
>>> arm_arch_v6_ok
>>>
>>> even if the test is not intended to be executed.
>>>
>>> OK?
>>
>> [I'm not a maintainer]
>>
>> You could argue that as the test is checking for just ARMv6, but then
>> uses ARMv6+VFPv2 features - and so it going wrong is to be expected
>> :-).
>>
>> So other approaches could be to see what adding
>>
>> /* { dg-require-effective-target arm_vfp_ok } */
>>
>> after dg-add-options achieves.
>
> That the test never runs on a Thumb1 processor.  Which slightly defeats
> the object of testing thumb1 code.
>

I still have a test with
/* { dg-require-effective-target arm_arch_v6_ok } */
/* { dg-add-options arm_arch_v6 } */
which fails when GCC is configured with --with-mode=thumb
--target=arm-none-linuxgnueabihf

Modifying check_effective_target_arm_arch_FUNC_ok as I suggested by
including an empty function definition (as in
check_effective_target_arm_arch_FUNC_multilib) suffices to turn the
test into UNSUPPORTED rather than FAIL.

What would you suggest instead?

Thanks,

Christophe.

Reply via email to