1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-05 09:19:27 +01: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);
}
/* 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
doit (int n)
{
@ -96,7 +101,7 @@ doit (int n)
return_bsp = bsp;
}
else
doit (n + 1);
(*doit_pointer) (n + 1);
}
int