8sa1-gcc/gcc/testsuite/gcc.dg/990424-1.c
Zack Weinberg 7b8442983d bcp-1.c: Replace abort in arg of __builtin_constant_p with a generic external function.
gcc/testsuite:
	* c-torture/execute/bcp-1.c: Replace abort in arg of
	__builtin_constant_p with a generic external function.

	* gcc.dg/20000108-1.c, gcc.dg/980211-1.c, gcc.dg/980414-1.c,
	gcc.dg/990119-1.c, gcc.dg/990409.c, gcc.dg/990424-1.c,
	gcc.dg/991230-1.c, gcc.dg/clobbers.c, gcc.dg/lineno.c,
	gcc.dg/noreturn-1.c, gcc.dg/trigraphs.c, gcc.dg/uninit-4.c:
	Prototype abort and/or exit.

	* gcc.dg/990407-1.c, gcc.dg/strpaste.c,
	gcc.dg/special/alias-1.c, gcc.dg/special/gcsec-1.c,
	gcc.dg/special/weak-1.c, gcc.dg/special/weak-2.c,
	gcc.dg/special/wkali-1.c, gcc.dg/special/wkali-2.c: Include stdlib.h.

libio/tests:
	* tfformat.c: Include stdlib.h.

From-SVN: r34110
2000-05-23 19:30:44 +00:00

30 lines
580 B
C

/* Test that stack alignment is preserved with pending_stack_adjust
with stdcall functions. */
/* { dg-do run { target i?86-*-* } } */
/* { dg-options -mpreferred-stack-boundary=4 } */
void __attribute__((stdcall)) foo(int a, int b, int c);
extern void abort (void);
extern void exit (int);
int
main ()
{
foo(1, 2, 3);
foo(1, 2, 3);
exit (0);
}
void __attribute__((stdcall))
foo(int a, int b, int c)
{
static int last_align = -1;
int dummy, align = (int)&dummy & 15;
if (last_align < 0)
last_align = align;
else if (align != last_align)
abort ();
}