OSDN Git Service

* gcc.dg/builtin-return-1.c (g): New.
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Jun 2007 19:48:46 +0000 (19:48 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Jun 2007 19:48:46 +0000 (19:48 +0000)
(main): Allocate at least 64 bytes on the stack.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125268 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-return-1.c

index 51d65e7..9f011b0 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-01  Kazu Hirata  <kazu@codesourcery.com>
+
+       * gcc.dg/builtin-return-1.c (g): New.
+       (main): Allocate at least 64 bytes on the stack.
+
 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.dg/init/cleanup3.C: New test.
index d228915..75c9acd 100644 (file)
@@ -17,8 +17,16 @@ int bar(int n)
   __builtin_return(__builtin_apply((void (*)(void))foo, __builtin_apply_args(), 64));
 }
 
+char *g;
+
 int main(void)
 {
+  /* Allocate 64 bytes on the stack to make sure that __builtin_apply
+     can read at least 64 bytes above the return address.  */
+  char dummy[64];
+
+  g = dummy;
+
   if (bar(1) != 2)
     abort();