1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-04-01 11:52:18 +02:00

2007-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>

* tests/ia64-test-setjmp.c (doit): New forward declaration.
	(doit_pointer): New function pointer variable initialized to DOIT.
	(doit): Self-call made by an unoptimizable volatile indirect call.
This commit is contained in:
Jan Kratochvil 2007-05-16 13:30:12 -06:00 committed by David Mosberger-Tang
parent 5f3d29562d
commit 565ffdb75c

View file

@ -70,6 +70,11 @@ sighandler (int signal, void *siginfo, void *sigcontext)
siglongjmp (env, 1); siglongjmp (env, 1);
} }
/* Direct call of doit () at the end of doit () would get optimized by GCC to
a branch. */
static void doit (int n);
static volatile void (*doit_pointer) (int n) = doit;
static void static void
doit (int n) doit (int n)
{ {
@ -96,7 +101,7 @@ doit (int n)
return_bsp = bsp; return_bsp = bsp;
} }
else else
doit (n + 1); (*doit_pointer) (n + 1);
} }
int int