This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]