On Thu, Apr 23, 2015 at 4:37 PM, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote: > > On 23/04/15 09:25, Terry Guo wrote: >> >> On Thu, Apr 23, 2015 at 4:23 PM, Kyrill Tkachov <kyrylo.tkac...@arm.com> >> wrote: >>> >>> Hi Terry, >>> >>> On 23/04/15 02:56, Terry Guo wrote: >>>> >>>> /* { dg-do compile } */ >>>> -/* { dg-options "-march=armv6-m -mthumb -O3 -w -mfloat-abi=soft" } */ >>>> +/* { dg-options "-mthumb -O2 -mfloat-abi=soft" } */ >>>> >>> >>> If you have really need the -mthumb here, don't you also >>> need to check for a thumb effective target? >>> I see in the testsuite we use things like: >>> /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ >>> or >>> /* { dg-require-effective-target arm_thumb2_ok } */ >>> >>> Kyrill >>> >> The -mthumb is necessary to reproduce this bug currently. But it is >> better to enable running this test for other targets, so I prefer not >> limiting this case for thumb1 target. > > Hi Terry, > > I had a closer look. This test has lots of warnings so > you really need that -w in the original options as well. > I was concerned that if you try adding -mthumb when we're > testing a target that doesn't support Thumb (say -march=armv4) > you'll get an error "target CPU does not support THUMB instructions" > but having tried it out myself, I see that we have this as a warning, > not an error, so the -w will silence it! > > I would prefer if you added a: > > /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ > > > So that the test will use Thumb (1 or 2) if possible, and not > test irrelevant to this test (defaulting -marm) behaviour otherwise. > > Kyrill > > >
Patch is updated per your suggestion. Is it OK now? BR, Terry diff --git a/gcc/testsuite/gcc.target/arm/pr65710.c b/gcc/testsuite/gcc.target/arm/pr65710.c index 139bc64..227059b 100644 --- a/gcc/testsuite/gcc.target/arm/pr65710.c +++ b/gcc/testsuite/gcc.target/arm/pr65710.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv6-m -mthumb -O3 -w -mfloat-abi=soft" } */ +/* { dg-options "-mthumb -O2 -mfloat-abi=soft -w" } */ +/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ struct ST { char *buffer;