On 04/01/2011 05:34 PM, Richard Earnshaw wrote: > On Fri, 2011-04-01 at 16:47 +0200, Tom de Vries wrote: >> Reposting, with ChangeLog. > > +/* { dg-options "-march=armv7-a -mthumb -Os" } */ > > No, use dg-require-effective-target. The above doesn't work properly > with multilib testing. >
Changed it into: +/* { dg-options "-mthumb -Os" } */ +/* { dg-require-effective-target arm_thumb2_ok } */ Thanks, - Tom
2011-04-01 Tom de Vries <t...@codesourcery.com> PR target/43920 * gcc.target/arm/pr43920-1.c: New test. Index: gcc/testsuite/gcc.target/arm/pr43920-1.c =================================================================== --- gcc/testsuite/gcc.target/arm/pr43920-1.c (revision 0) +++ gcc/testsuite/gcc.target/arm/pr43920-1.c (revision 0) @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-mthumb -Os" } */ +/* { dg-require-effective-target arm_thumb2_ok } */ + +int +f (int start, int end, int *start_) +{ + if (start == -1 || end == -1) + return -1; + + if (end - start) + return -1; + + *start_ = start; + + return 0; +} + +/* { dg-final { scan-assembler-times "\torr" 0 } } */ +/* { dg-final { scan-assembler-times "\tit\t" 0 } } */ +/* { dg-final { scan-assembler "\tbeq" } } */