diff mbox

[ARM,committed] Fix for PR78255-2.c testism for targets that do not optimize for tailcall

Message ID 58595F80.3070204@arm.com
State New
Headers show

Commit Message

Andre Vieira (lists) Dec. 20, 2016, 4:42 p.m. UTC
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.simoesdiasvieira@arm.com>

* gcc.target/arm/pr78255-2.c: Fix to work for targets
that do not optimize for tailcall.
diff mbox

Patch

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" } } */