Hi,
the testcase fails when compiled on gcc-4.1 with optimizations (specific GCC
flags upon request).
2007-04-05 Jan Kratochvil <[EMAIL PROTECTED]>
* 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.
--- libunwind-git-clean/tests/ia64-test-setjmp.c 2007-03-08
21:26:26.000000000 +0100
+++ libunwind-clean/tests/ia64-test-setjmp.c 2007-04-05 17:48:57.000000000
+0200
@@ -70,6 +70,11 @@ sighandler (int signal, void *siginfo, v
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
_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel