This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gcc.c-torture/execute/frame-address.c
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Mon, 29 Aug 2005 23:50:16 +0930
- Subject: gcc.c-torture/execute/frame-address.c
This test fails on powerpc64-linux, because the function invoking
__builtin_frame_address doesn't have a stack frame. Fixed by taking
the address of a local var.
* gcc.c-torture/execute/frame-address.c: Ensure function
invoking __builtin_frame_address has a stack frame.
OK to apply?
Index: gcc/testsuite/gcc.c-torture/execute/frame-address.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/frame-address.c,v
retrieving revision 1.1
diff -u -p -r1.1 frame-address.c
--- gcc/testsuite/gcc.c-torture/execute/frame-address.c 25 Aug 2005 11:30:19 -0000 1.1
+++ gcc/testsuite/gcc.c-torture/execute/frame-address.c 29 Aug 2005 14:14:27 -0000
@@ -1,9 +1,9 @@
-int check_fa_work (const char *, const char *) __attribute__((noinline));
+int check_fa_work (const char *, const char *, const char *) __attribute__((noinline));
int check_fa_mid (const char *) __attribute__((noinline));
int check_fa (char *) __attribute__((noinline));
int how_much (void) __attribute__((noinline));
-int check_fa_work (const char *c, const char *f)
+int check_fa_work (const char *c, const char *f, const char *x)
{
const char d = 0;
@@ -16,8 +16,9 @@ int check_fa_work (const char *c, const
int check_fa_mid (const char *c)
{
const char *f = __builtin_frame_address (0);
+ const char x = 0;
- return check_fa_work (c, f);
+ return check_fa_work (c, f, &x);
}
int check_fa (char *unused)
--
Alan Modra
IBM OzLabs - Linux Technology Centre