8sa1-gcc/gcc/testsuite/gcc.dg/980211-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
490 B
C

/* Test long double on x86. */
/* { dg-do run { target i?86-*-* } } */
/* { dg-options -O2 } */
extern void abort (void);
__inline int
__signbitl (long double __x)
{
union { long double __l; int __i[3]; } __u = { __l: __x };
return (__u.__i[2] & 0x8000) != 0;
}
void
foo (long double x, long double y)
{
long double z = x / y;
if (__signbitl (x) && __signbitl (z))
abort ();
}
int main()
{
if (sizeof (long double) > sizeof (double))
foo (-0.0, -1.0);
return 0;
}