From ef0e3441246ee1dc01b3bf39622bc53644b181f8 Mon Sep 17 00:00:00 2001 From: Renlin Li Date: Tue, 13 Jun 2017 13:57:45 +0000 Subject: [PATCH] [ARM][Testsuite]make dump_stack function call conditional in cold-lc.c After r249013, die () and dump_stack () are both in cold section. This makes the compiler generate bl instruction for the function call, instead of honoring the -mlong-calls option. This patch changes the dump_stack function call conditional, which fixes the regression. gcc/testsuite/ * gcc.target/arm/cold-lc.c: Update coding style, call dump_stack conditionally. From-SVN: r249157 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/cold-lc.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9a9fb2fa65..6b33a67c08c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-06-13 Renlin Li + + * gcc.target/arm/cold-lc.c: Update coding style, call dump_stack + conditionally. + 2017-06-13 Martin Jambor PR tree-optimization/80803 diff --git a/gcc/testsuite/gcc.target/arm/cold-lc.c b/gcc/testsuite/gcc.target/arm/cold-lc.c index 467a6966bd3..f0cd6df3468 100644 --- a/gcc/testsuite/gcc.target/arm/cold-lc.c +++ b/gcc/testsuite/gcc.target/arm/cold-lc.c @@ -11,13 +11,14 @@ extern int show_stack (struct task_struct *, unsigned long *); void dump_stack (void) { - unsigned long stack; - show_stack ((current_thread_info ()->task), &stack); + unsigned long stack; + show_stack ((current_thread_info ()->task), &stack); } void die (char *str, void *fp, int nr) { + if (nr) dump_stack (); - while (1); + while (1); } -- 2.30.2