Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arm / cold-lc.c
blobf0cd6df34682401bebbb373280d013a0a7c11dff
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mlong-calls" } */
3 /* { dg-final { scan-assembler-not "bl\[^\n\]*dump_stack" } } */
5 extern void dump_stack (void) __attribute__ ((__cold__)) __attribute__ ((noinline));
6 struct thread_info {
7 struct task_struct *task;
8 };
9 extern struct thread_info *current_thread_info (void);
10 extern int show_stack (struct task_struct *, unsigned long *);
12 void dump_stack (void)
14 unsigned long stack;
15 show_stack ((current_thread_info ()->task), &stack);
18 void die (char *str, void *fp, int nr)
20 if (nr)
21 dump_stack ();
22 while (1);