8sa1-gcc/gcc/testsuite/gcc.dg/20000108-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

21 lines
451 B
C

/* Copyright (C) 2000 Free Software Foundation.
by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */
/* { dg-do run } */
/* { dg-options "-O3" } */
extern void abort (void);
void foo () {} /* unused, but essential to trigger the bug */
int main () {
int i;
/* use asms to prevent optimizations */
/* i = -1; */ asm ("" : "=r" (i) : "0" (-1));
/* i = 1; */ asm ("" : "=r" (i) : "0" (i ? 1 : 2));
if (i != 1)
abort();
return 0;
}