re PR target/18343 (mmix-knuth-mmixware testsuite failure: gcc.dg/builtin-return-1.c)

PR target/18343
	* gcc.dg/torture/stackalign/builtin-return-1.c (STACK_ARGUMENTS_SIZE):
	New macro, 0 for __MMIX__, default 64.
	(bar): Pass it to __builtin_apply instead of literal 64.

From-SVN: r211333
This commit is contained in:
Hans-Peter Nilsson 2014-06-06 23:58:33 +00:00 committed by Hans-Peter Nilsson
parent b528fc5cd9
commit 246e427d7a
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2014-06-07 Hans-Peter Nilsson <hp@bitrange.com>
PR target/18343
* gcc.dg/torture/stackalign/builtin-return-1.c (STACK_ARGUMENTS_SIZE):
New macro, 0 for __MMIX__, default 64.
(bar): Pass it to __builtin_apply instead of literal 64.
2014-06-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* gfortran.dg/io_constraints_11.f90: New file.

View File

@ -5,6 +5,13 @@
/* This used to fail on SPARC because the (undefined) return
value of 'bar' was overwriting that of 'foo'. */
#ifdef __MMIX__
/* No parameters on stack for bar. */
#define STACK_ARGUMENTS_SIZE 0
#else
#define STACK_ARGUMENTS_SIZE 64
#endif
extern void abort(void);
int foo(int n)
@ -14,7 +21,8 @@ int foo(int n)
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(),
STACK_ARGUMENTS_SIZE));
}
char *g;