Commit 069a73f9 by Kazu Hirata Committed by Kazu Hirata

builtin-return-1.c (g): New.

	* gcc.dg/builtin-return-1.c (g): New.
	(main): Allocate at least 64 bytes on the stack.

From-SVN: r125268
parent 5e984b90
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> 2007-05-31 Mark Mitchell <mark@codesourcery.com>
* g++.dg/init/cleanup3.C: New test. * g++.dg/init/cleanup3.C: New test.
...@@ -17,8 +17,16 @@ int bar(int n) ...@@ -17,8 +17,16 @@ int bar(int n)
__builtin_return(__builtin_apply((void (*)(void))foo, __builtin_apply_args(), 64)); __builtin_return(__builtin_apply((void (*)(void))foo, __builtin_apply_args(), 64));
} }
char *g;
int main(void) 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) if (bar(1) != 2)
abort(); abort();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment