On 12/12/16 09:04, Christophe Lyon wrote: >> > > The new test (gcc.target/arm/pr78255-2.c scan-assembler b\\s+bar) > added at r243494 fails on old arm architectures, such as: > * arm-none-linux-gnueabi, forcing -march=armv5t in runtestflags > * arm-none-eabi with default cpu/fpu/mode > > Christophe Hi,
Thank you for reporting this Christophe and sorry for the delay. The scan check obviously will not work for targets that do not optimize tailcalls. So I applied this patch as obvious in revision r243826, such that the test also accepts direct non-tailcalls, i.e. 'bl?' rather than 'b'. The test is really to make sure a direct call is not turned into an indirect call. gcc/testsuite/ChangeLog: 2016-12-20 Andre Vieira <andre.simoesdiasvie...@arm.com> * gcc.target/arm/pr78255-2.c: Fix to work for targets that do not optimize for tailcall.
diff --git a/gcc/testsuite/gcc.target/arm/pr78255-2.c b/gcc/testsuite/gcc.target/arm/pr78255-2.c index efa01e750b3962497cccb05ab9862fd3935397a3..cc1c1801c37ee103da90df940a673ceeac2772ed 100644 --- a/gcc/testsuite/gcc.target/arm/pr78255-2.c +++ b/gcc/testsuite/gcc.target/arm/pr78255-2.c @@ -9,4 +9,4 @@ foo (void) return bar ((void*)bar); } -/* { dg-final { scan-assembler "b\\s+bar" } } */ +/* { dg-final { scan-assembler "bl?\\s+bar" } } */