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
+2017-06-13 Renlin Li <renlin.li@arm.com>
+
+ * gcc.target/arm/cold-lc.c: Update coding style, call dump_stack
+ conditionally.
+
2017-06-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/80803
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);
}