[testsuite] dfp test options, debugging macro changes

Janis Johnson janis187@us.ibm.com
Wed Sep 16 16:41:00 GMT 2009


Many of the tests in gcc.dg/dfp use macros FAILURE and FINISH when -DDBG
is added to the options used to compile the tests.  Those macros are
defined within individual tests, sometimes in different ways.  When
something breaks I often add those macros to failing tests.

This patch moves the debugging support for the dfp tests to a new header
file and regularizes the use of the macros.  It also changes the default
compiler flags used for these tests to some that make sense for these
tests.  Changing the default compiler flags will make it easier to move
some tests to a new testsuite/c-c++-common/dfp directory.

Tested on powerpc64-unknown-linux-gnu and i686-pc-linux-gnu, checked
in on trunk.

2009-09-16  Janis Johnson  <janis187@us.ibm.com>

	* gcc.dg/dfp/dfp.exp: Use appropriate default options.
	* gcc.dg/dfp/dfp-dbg.h: New; define FAILURE, FINISH.
	* gcc.dg/dfp/cast-bad.c: Use default options.
	* gcc.dg/dfp/compare-rel-const.c: Ditto.
	* gcc.dg/dfp/composite-type.c: Ditto.
	* gcc.dg/dfp/constants.c: Ditto.
	* gcc.dg/dfp/constants-hex.c: Ditto.
	* gcc.dg/dfp/constants-pedantic.c: Ditto.
	* gcc.dg/dfp/convert-bfp-fold.c: Ditto.
	* gcc.dg/dfp/convert-dfp-fold.c: Ditto.
	* gcc.dg/dfp/convert-int-max-fold.c: Ditto.
	* gcc.dg/dfp/ctypes.c: Ditto.
	* gcc.dg/dfp/ddmode-ice.c: Ditto.
	* gcc.dg/dfp/dec-eval-method-2.c: Ditto.
	* gcc.dg/dfp/float-constant-double.c: Ditto.
	* gcc.dg/dfp/keywords-pedantic.c: Ditto.
	* gcc.dg/dfp/keywords-reserved.c: Ditto.
	* gcc.dg/dfp/modes.c: Ditto.
	* gcc.dg/dfp/operator-bitwise.c: Ditto.
	* gcc.dg/dfp/pr31344.c: Ditto.
	* gcc.dg/dfp/pr31385.c: Ditto.
	* gcc.dg/dfp/pr33466.c: Ditto.
	* gcc.dg/dfp/pr35620.c: Ditto.
	* gcc.dg/dfp/pr37435.c: Ditto.
	* gcc.dg/dfp/pr39986.c: Ditto.
	* gcc.dg/dfp/pragma-float-const-decimal64-1.c: Ditto.
	* gcc.dg/dfp/pragma-float-const-decimal64-2.c: Ditto.
	* gcc.dg/dfp/pragma-float-const-decimal64-3.c: Ditto.
	* gcc.dg/dfp/pragma-float-const-decimal64-4.c: Ditto.
	* gcc.dg/dfp/pragma-float-const-decimal64-7.c: Ditto.
	* gcc.dg/dfp/pragma-float-const-decimal64-8.c: Ditto.
	* gcc.dg/dfp/typespec.c: Ditto.
	* gcc.dg/dfp/usual-arith-conv-bad.c: Ditto.
	* gcc.dg/dfp/usual-arith-conv-bad-2.c: Ditto.
	* gcc.dg/dfp/usual-arith-conv-const.c: Ditto.
	* gcc.dg/dfp/Wbad-function-cast-1.c: Ditto.
	* gcc.dg/dfp/Wtraditional-conversion-2.c: Ditto.
	* gcc.dg/dfp/wtr-conversion-1.c: Ditto.
	* gcc.dg/dfp/compare-eq.h: Define custom debug macros.
	* gcc.dg/dfp/compare-rel.h: Ditto.
	* gcc.dg/dfp/compare-special.h: Ditto.
	* gcc.dg/dfp/convert.h: Ditto.
	* gcc.dg/dfp/fe-check.h: Ditto.
	* gcc.dg/dfp/call-by-value.c: Use default options and
	  debug macros.
	* gcc.dg/dfp/cast.c: Ditto.
	* gcc.dg/dfp/compare-eq-const.c: Ditto.
	* gcc.dg/dfp/compare-eq-d32.c: Ditto.
	* gcc.dg/dfp/compare-eq-d64.c: Ditto.
	* gcc.dg/dfp/compare-eq-d128.c: Ditto.
	* gcc.dg/dfp/compare-eq-dfp.c: Ditto.
	* gcc.dg/dfp/compare-rel-d32.c: Ditto.
	* gcc.dg/dfp/compare-rel-d64.c: Ditto.
	* gcc.dg/dfp/compare-rel-d128.c: Ditto.
	* gcc.dg/dfp/compare-rel-dfp.c: Ditto.
	* gcc.dg/dfp/compare-special-d32.c: Ditto.
	* gcc.dg/dfp/compare-special-d64.c: Ditto.
	* gcc.dg/dfp/compare-special-d128.c: Ditto.
	* gcc.dg/dfp/constants-zero.c: Ditto.
	* gcc.dg/dfp/convert-bfp-2.c: Ditto.
	* gcc.dg/dfp/convert-bfp-3.c: Ditto.
	* gcc.dg/dfp/convert-bfp-4.c: Ditto.
	* gcc.dg/dfp/convert-bfp-5.c: Ditto.
	* gcc.dg/dfp/convert-bfp-6.c: Ditto.
	* gcc.dg/dfp/convert-bfp-7.c: Ditto.
	* gcc.dg/dfp/convert-bfp-8.c: Ditto.
	* gcc.dg/dfp/convert-bfp-9.c: Ditto.
	* gcc.dg/dfp/convert-bfp-10.c: Ditto.
	* gcc.dg/dfp/convert-bfp-11.c: Ditto.
	* gcc.dg/dfp/convert-bfp-12.c: Ditto.
	* gcc.dg/dfp/convert-bfp-13.c: Ditto.
	* gcc.dg/dfp/convert-bfp-14.c: Ditto.
	* gcc.dg/dfp/convert-bfp.c: Ditto.
	* gcc.dg/dfp/convert-complex.c: Ditto.
	* gcc.dg/dfp/convert-dfp.c: Ditto.
	* gcc.dg/dfp/convert-dfp-fold-2.c: Ditto.
	* gcc.dg/dfp/convert-dfp-round.c: Ditto.
	* gcc.dg/dfp/convert-int.c: Ditto.
	* gcc.dg/dfp/convert-int-fold.c: Ditto.
	* gcc.dg/dfp/convert-int-max.c: Ditto.
	* gcc.dg/dfp/convert-int-saturate.c: Ditto.
	* gcc.dg/dfp/decfloat-constants.c: Ditto.
	* gcc.dg/dfp/fe-binop.c: Ditto.
	* gcc.dg/dfp/fe-convert-1.c: Ditto.
	* gcc.dg/dfp/fe-convert-2.c: Ditto.
	* gcc.dg/dfp/fe-convert-3.c: Ditto.
	* gcc.dg/dfp/func-array.c: Ditto.
	* gcc.dg/dfp/func-deref.c: Ditto.
	* gcc.dg/dfp/func-mixed.c: Ditto.
	* gcc.dg/dfp/func-pointer.c: Ditto.
	* gcc.dg/dfp/func-scalar.c: Ditto.
	* gcc.dg/dfp/func-struct.c: Ditto.
	* gcc.dg/dfp/func-vararg-alternate.h: Ditto.
	* gcc.dg/dfp/func-vararg-alternate-d32.c: Ditto.
	* gcc.dg/dfp/func-vararg-alternate-d64.c: Ditto.
	* gcc.dg/dfp/func-vararg-alternate-d128.c: Ditto.
	* gcc.dg/dfp/func-vararg-alternate-d128-2.c: Ditto.
	* gcc.dg/dfp/func-vararg-dfp.c: Ditto.
	* gcc.dg/dfp/func-vararg-mixed.c: Ditto.
	* gcc.dg/dfp/func-vararg-mixed-2.c: Ditto.
	* gcc.dg/dfp/func-vararg-size0.c: Ditto.
	* gcc.dg/dfp/inf-1.c: Ditto.
	* gcc.dg/dfp/loop-index.c: Ditto.
	* gcc.dg/dfp/nan-1.c: Ditto.
	* gcc.dg/dfp/nan-2.c: Ditto.
	* gcc.dg/dfp/operator-arith-fold.c: Ditto.
	* gcc.dg/dfp/operator-assignment.c: Ditto.
	* gcc.dg/dfp/operator-comma.c: Ditto.
	* gcc.dg/dfp/operator-cond.c: Ditto.
	* gcc.dg/dfp/operator-logical.c: Ditto.
	* gcc.dg/dfp/operator-unary.c: Ditto.
	* gcc.dg/dfp/pr36800.c: Ditto.
	* gcc.dg/dfp/pr39034.c: Ditto.
	* gcc.dg/dfp/pr39035.c: Ditto.
	* gcc.dg/dfp/pr39902.c: Ditto.
	* gcc.dg/dfp/signbit-1.c: Ditto.
	* gcc.dg/dfp/signbit-2.c: Ditto.
	* gcc.dg/dfp/struct-layout-1.c: Ditto.
	* gcc.dg/dfp/union-init.c: Ditto.
	* gcc.dg/dfp/usual-arith-conv.c: Ditto.

Index: gcc/testsuite/gcc.dg/dfp/dfp.exp
===================================================================
--- gcc/testsuite/gcc.dg/dfp/dfp.exp	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/dfp.exp	(working copy)
@@ -37,12 +37,14 @@ if { ![check_effective_target_dfprt] } {
 }
 verbose "dfp.exp: dg-do-what-default is ${dg-do-what-default}" 2
 
-# If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
-if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+if [info exists DEFAULT_CFLAGS] then {
+  set save_default_cflags DEFAULT_CFLAGS
 }
 
+# If a testcase doesn't have special options, use these.
+set DEFAULT_CFLAGS "-std=gnu99"
+
 # Initialize `dg'.
 dg-init
 
@@ -55,3 +57,6 @@ dg-finish
 
 set dg-do-what-default ${save-dg-do-what-default}
 verbose "dfp.exp: dg-do-what-default is ${dg-do-what-default}" 2
+if [info exists save_default_cflags] {
+  set DEFAULT_CFLAGS $save_default_cflags
+}
Index: gcc/testsuite/gcc.dg/dfp/dfp-dbg.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/dfp-dbg.h	(revision 0)
+++ gcc/testsuite/gcc.dg/dfp/dfp-dbg.h	(revision 0)
@@ -0,0 +1,10 @@
+int failures;
+
+#ifdef DBG
+extern int printf (const char *, ...);
+#define FAILURE { printf ("failed at line %d\n", __LINE__); failures++; }
+#define FINISH if (failures != 0) __builtin_abort (); return 0;
+#else
+#define FAILURE __builtin_abort ();
+#define FINISH return 0;
+#endif
Index: gcc/testsuite/gcc.dg/dfp/cast-bad.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/cast-bad.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/cast-bad.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.4 Cast operators.
    Test invalid casts involving decimal float.  */
Index: gcc/testsuite/gcc.dg/dfp/compare-rel-const.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-rel-const.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-rel-const.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.8 Relational operators.
    Compare decimal float constants against each other. */
 
Index: gcc/testsuite/gcc.dg/dfp/composite-type.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/composite-type.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/composite-type.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O -Wall" } */
+/* { dg-options "-O -Wall" } */
 
 /* C99 6.2.7: Compatible type and composite type.  */
 
Index: gcc/testsuite/gcc.dg/dfp/constants.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/constants.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/constants.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* N1150 6: Constants.
    C99 6.4.4.2: Floating constants.  */
Index: gcc/testsuite/gcc.dg/dfp/constants-hex.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/constants-hex.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/constants-hex.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* N1150 6: Constants.
    C99 6.4.4.2: Floating constants.
Index: gcc/testsuite/gcc.dg/dfp/constants-pedantic.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/constants-pedantic.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/constants-pedantic.c	(working copy)
@@ -1,9 +1,11 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -pedantic" } */
+/* { dg-options "-pedantic" } */
 
 /* N1150 6: Constants.
    C99 6.4.4.2: Floating constants.  */
 
+#include "dfp-dbg.h"
+
 _Decimal32 a = 1.1df;		/* { dg-warning "GCC extension|ISO C" } */
 _Decimal32 b = -.003DF;		/* { dg-warning "GCC extension|ISO C" } */
 _Decimal64 c = 11e-1dl;		/* { dg-warning "GCC extension|ISO C" } */
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
    decimal floating types and generic floating types.
Index: gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
    decimal floating types and generic floating types.
Index: gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2 -w" } */
 
 /* N1150 5.1 Conversions from decimal float to integer.  */
 
Index: gcc/testsuite/gcc.dg/dfp/ctypes.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/ctypes.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/ctypes.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* N1150 3: Decimal floating types.
    C99 6.7.2: Type specifiers  */
Index: gcc/testsuite/gcc.dg/dfp/ddmode-ice.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/ddmode-ice.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/ddmode-ice.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O1" } */
+/* { dg-options "-O1" } */
 
 /* This used to result in an ICE.  */
 
Index: gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -D__STDC_WANT_DEC_FP__" } */
+/* { dg-options "-D__STDC_WANT_DEC_FP__" } */
                                                                                 
 /* N1107 4: Characteristics of decimal floating types <float.h>.
    C99 5.2.4.2.2a[2] (New).
Index: gcc/testsuite/gcc.dg/dfp/float-constant-double.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/float-constant-double.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/float-constant-double.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* Constant float values of type double in <float.h> are suffixed with L
    and cast to double so they can be used within code that uses pragma
Index: gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -pedantic" } */
+/* { dg-options "-pedantic" } */
 
 /* Decimal float is a GCC extension.  */
 
Index: gcc/testsuite/gcc.dg/dfp/keywords-reserved.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/keywords-reserved.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/keywords-reserved.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* N1150 3: Decimal floating types.
    C99 6.4.1(2): Keywords.
Index: gcc/testsuite/gcc.dg/dfp/modes.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/modes.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/modes.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 typedef float decimal32  __attribute__ ((mode (SD)));
 typedef float decimal64  __attribute__ ((mode (DD)));
Index: gcc/testsuite/gcc.dg/dfp/operator-bitwise.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-bitwise.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-bitwise.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.10: Bitwise AND operator.
    C99 6.5.11: Bitwise exclusive OR operator.
@@ -7,8 +6,6 @@
 
    Test that these operators do not accept decimal float operands.  */
 
-extern void abort (void);
-
 #define OPERATE(OPRD1,OPRT,OPRD2)		\
 do						\
 {						\
Index: gcc/testsuite/gcc.dg/dfp/pr31344.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr31344.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr31344.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O -std=gnu99 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-options "-O -std=gnu99" } */
+/* { dg-options "-O -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-O" } */
 
 typedef struct
 {
Index: gcc/testsuite/gcc.dg/dfp/pr31385.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr31385.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr31385.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2" } */
 
 typedef _Decimal32 fp_t;
 
Index: gcc/testsuite/gcc.dg/dfp/pr33466.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr33466.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr33466.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* The suffix for a decimal float constant must use a single case.
 
Index: gcc/testsuite/gcc.dg/dfp/pr35620.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr35620.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr35620.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2" } */
 
 extern void foo (_Decimal32);
 _Decimal32 *p;
Index: gcc/testsuite/gcc.dg/dfp/pr37435.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr37435.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr37435.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target fpic } } */
-/* { dg-options "-std=gnu99 -O2 -fPIC" } */
+/* { dg-options "-O2 -fPIC" } */
 
 volatile _Decimal32 d;
 volatile int i;
Index: gcc/testsuite/gcc.dg/dfp/pr39986.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr39986.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr39986.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* Check that the compiler generates the correct decimal float constants.  */
 
Index: gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-1.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wall" } */
+/* { dg-options "-Wall" } */
 
 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
    C99 6.4.4.2a (New).
Index: gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-2.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wall" } */
+/* { dg-options "-Wall" } */
 
 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
    C99 6.4.4.2a (New).
Index: gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-3.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-3.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-3.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wall" } */
+/* { dg-options "-Wall" } */
 
 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
    C99 6.4.4.2a (New).  */
Index: gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-4.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-4.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-4.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
    C99 6.4.4.2a (New).
Index: gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-7.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-7.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-7.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wall" } */
+/* { dg-options "-Wall" } */
 
 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
    C99 6.4.4.2a (New).
Index: gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wall" } */
+/* { dg-options "-Wall" } */
 
 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
    C99 6.4.4.2a (New).
Index: gcc/testsuite/gcc.dg/dfp/typespec.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/typespec.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/typespec.c	(working copy)
@@ -1,7 +1,6 @@
 /* Test for valid and invalid combinations of type specifiers.
    Based off gcc.dg/test-spec-1.c */
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 typedef char type;
 void _Decimal32 *x0;  /* { dg-error "" "void _Decimal32" } */
Index: gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* N1150 5.4: Usual arithmetic conversions.
    C99 6.3.1.8[1] (New).
Index: gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad-2.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* This used to result in an ICE.  */
 
Index: gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c	(working copy)
@@ -1,5 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
 
 /* Test various conversions involving decimal floating types. */
 
Index: gcc/testsuite/gcc.dg/dfp/Wbad-function-cast-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/Wbad-function-cast-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/Wbad-function-cast-1.c	(working copy)
@@ -2,7 +2,7 @@
 /* Based on gcc.dg/Wbad-function-cast-1.c.  */
 
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wbad-function-cast" } */
+/* { dg-options "-Wbad-function-cast" } */
 
 int if1(void);
 char if2(void);
Index: gcc/testsuite/gcc.dg/dfp/Wtraditional-conversion-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/Wtraditional-conversion-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/Wtraditional-conversion-2.c	(working copy)
@@ -2,7 +2,7 @@
    (based on gcc.dg/Wtraditional-conversion-2.c).  */
 
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wtraditional-conversion" } */
+/* { dg-options "-Wtraditional-conversion" } */
 
 void fsi(signed int);
 void fd32(_Decimal32);
Index: gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c	(working copy)
@@ -3,7 +3,7 @@
    Based on gcc.dg/wtr-conversion-1.c  */
 
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wtraditional" } */
+/* { dg-options "-Wtraditional" } */
 
 extern void foo_i (int);
 extern void foo_f (float);
Index: gcc/testsuite/gcc.dg/dfp/compare-eq.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-eq.h	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-eq.h	(working copy)
@@ -2,19 +2,18 @@
    are not affected by rounding.  */
 
 #include <stdlib.h>
-
-static int failcnt;
+#include "dfp-dbg.h"
 
 #define PASTE2(A,B) A ## B
 #define PASTE(A,B) PASTE2(A,B)
 
+#undef FAILURE
 #ifdef DBG
-#include <stdio.h>
 #define FAILURE(OP,KIND) \
   { printf ("failed at line %d: %s for %s values\n", __LINE__, OP, KIND); \
-    failcnt++; }
+    failures++; }
 #else
-#define FAILURE(OP,KIND) abort ();
+#define FAILURE(OP,KIND) __builtin_abort ();
 #endif
 
 #ifndef WIDTH
@@ -90,7 +89,4 @@ test_compares (void)
   if (! (x != zero))  FAILURE ("!=", "greater")
   if (! (y != m_one)) FAILURE ("!=", "greater")
   if (! (z != m_two)) FAILURE ("!=", "greater")
-
-  if (failcnt)
-    abort ();
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-rel.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-rel.h	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-rel.h	(working copy)
@@ -2,21 +2,20 @@
    are not affected by rounding.  */
 
 #include <stdlib.h>
+#include "dfp-dbg.h"
 
-static int failcnt;
-
-#define PASTE2(A,B) A ## B
-#define PASTE(A,B) PASTE2(A,B)
-
+#undef FAILURE
 #ifdef DBG
-#include <stdio.h>
 #define FAILURE(OP,KIND) \
   { printf ("failed at line %d: %s for %s values\n", __LINE__, OP, KIND); \
-    failcnt++; }
+    failures++; }
 #else
-#define FAILURE(OP,KIND) abort ();
+#define FAILURE(OP,KIND) __builtin_abort ();
 #endif
 
+#define PASTE2(A,B) A ## B
+#define PASTE(A,B) PASTE2(A,B)
+
 #ifndef WIDTH
 #error define WIDTH as decimal float size in bytes
 #endif
@@ -130,7 +129,4 @@ test_compares (void)
   if (y > one)        FAILURE (">", "greater")
   if (z > zero)       FAILURE (">", "greater")
   if (z > one)        FAILURE (">", "greater")
-
-  if (failcnt)
-    abort ();
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-special.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-special.h	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-special.h	(working copy)
@@ -1,19 +1,19 @@
 /* Basic test of runtime relational comparisons using NaNs and infinities.  */
 
 #include <stdlib.h>
-
-static int failcnt;
+#include "dfp-dbg.h"
 
 #define PASTE2(A,B) A ## B
 #define PASTE(A,B) PASTE2(A,B)
 
+/* Override FAILURE from dfp-dbg.h with one that provides additional info.  */
+#undef FAILURE
 #ifdef DBG
-#include <stdio.h>
 #define FAILURE(OP,KIND) \
   { printf ("failed at line %d: %s for %s values\n", __LINE__, OP, KIND); \
-    failcnt++; }
+    failures++; }
 #else
-#define FAILURE(OP,KIND) abort ();
+#define FAILURE(OP,KIND) __builtin_abort ();
 #endif
 
 #ifndef WIDTH
@@ -281,7 +281,4 @@ test_compares (void)
   if (!(y != m_inf)) FAILURE ("!=", "inf")
   if (!(z != inf))   FAILURE ("!=", "inf")
   if (z != m_inf)    FAILURE ("!=", "inf")
-
-  if (failcnt)
-    abort ();
 }
Index: gcc/testsuite/gcc.dg/dfp/convert.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert.h	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert.h	(working copy)
@@ -1,5 +1,4 @@
-extern void abort (void);
-static int failcnt = 0;
+#include "dfp-dbg.h"
 
 /* Macros are set up to skip using long double, which doesn't necessarily
    map to TF mode.  If there's a reason to skip those for a test, the
@@ -8,14 +7,16 @@ static int failcnt = 0;
 #define USE_TF 1
 #endif
 
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
+/* Provide more information with FAILURE than what is available with
+   the version of that macro in dfp-dbg.h.  */
+
+#undef FAILURE
 #if defined(DBG) || defined(DBG2)
 #include <stdio.h>
 #define FAILURE(NUM) \
-  { printf ("failed for test %s\n", NUM); failcnt++; }
+  { printf ("failed for test %s\n", NUM); failures++; }
 #else
-#define FAILURE(N) abort ();
+#define FAILURE(N) __builtin_abort ();
 #endif
 
 /* This is useful when modifying the test to make sure that tests are
Index: gcc/testsuite/gcc.dg/dfp/fe-check.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/fe-check.h	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/fe-check.h	(working copy)
@@ -2,19 +2,17 @@
    are raised for decimal float operations.  These tests are here to test
    the software decimal float support in libgcc.  */
 
+#include "dfp-dbg.h"
 #include "dfp-except.h"
 
-extern void abort (void);
-static int failcnt = 0;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
 #if defined(DBG) || defined(DBG2)
 #include <stdio.h>
+#undef FAILURE
 #define FAILURE(NUM,KIND,EXCEPT) \
-  { printf ("failed for test %d: %s %s\n", NUM, KIND, EXCEPT); failcnt++; }
+  { printf ("failed for test %d: %s %s\n", NUM, KIND, EXCEPT); failures++; }
 #else
-#define FAILURE(N,K,E) abort ();
+#undef FAILURE
+#define FAILURE(N,K,E) __builtin_abort ();
 #endif
 
 /* This is useful when modifying the test to make sure that tests are
Index: gcc/testsuite/gcc.dg/dfp/call-by-value.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/call-by-value.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/call-by-value.c	(working copy)
@@ -1,11 +1,9 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.9.1(9) Function definitions; parameter has automatic storage.
 
    Test that actual parameters are passed by value and that modifications
    made within functions are lost on function return.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 int foo32 (_Decimal32 z)
 {
@@ -31,15 +29,15 @@ main ()
 
   foo32 (d32);
   if (d32 != 1.1df)
-    abort ();
+    FAILURE
 
   foo64 (d64);
   if (d64 != 1.2dd)
-    abort ();
+    FAILURE
 
   foo128 (d128);
   if (d128 != 1.3dl)
-    abort ();
+    FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/cast.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/cast.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/cast.c	(working copy)
@@ -1,17 +1,7 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.4 Cast operators.
    Test valid casts involving decimal float.  */
 
-extern void abort (void);
-int failcnt;
-                                                                                
-#ifdef DBG
-extern int printf (const char *, ...);
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 _Decimal32 d32;
 _Decimal64 d64;
@@ -81,8 +71,5 @@ main (void)
   if (d128 != (_Decimal128) d)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-eq-const.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-eq-const.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-eq-const.c	(working copy)
@@ -1,8 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.9 Equality operators.
    Compare decimal float constants against each other. */
 
+#include "dfp-dbg.h"
+
 extern void link_error (void);
 
 int
@@ -24,5 +24,5 @@ main ()
   if (1.4dd + 1.4dd + 1.4dd != 4.2dd)
     link_error ();
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-eq-d32.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-eq-d32.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-eq-d32.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.9 Equality operators.
    Compare decimal float values against each other at runtime.  */
@@ -9,5 +9,6 @@
 int main ()
 {
   test_compares ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-eq-d64.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-eq-d64.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-eq-d64.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.9 Equality operators.
    Compare decimal float values against each other at runtime.  */
@@ -9,5 +9,6 @@
 int main ()
 {
   test_compares ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-eq-d128.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-eq-d128.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-eq-d128.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.9 Equality operators.
    Compare decimal float values against each other at runtime.  */
@@ -9,5 +9,6 @@
 int main ()
 {
   test_compares ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-eq-dfp.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-eq-dfp.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-eq-dfp.c	(working copy)
@@ -1,19 +1,9 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.9 Equality operators.
    Compare decimal float values against variables of different types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 _Decimal32 d32;
 _Decimal64 d64;
@@ -59,7 +49,5 @@ main ()
 
   compare_dfp ();
 
-  if (failcnt)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-rel-d32.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-rel-d32.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-rel-d32.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    Compare decimal float values against each other at runtime.  */
@@ -10,5 +10,5 @@ int
 main ()
 {
   test_compares ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-rel-d64.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-rel-d64.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-rel-d64.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    Compare decimal float values against each other at runtime.  */
@@ -10,5 +10,5 @@ int
 main ()
 {
   test_compares ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-rel-d128.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-rel-d128.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-rel-d128.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    Compare decimal float values against each other at runtime.  */
@@ -10,5 +10,5 @@ int
 main ()
 {
   test_compares ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-rel-dfp.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-rel-dfp.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-rel-dfp.c	(working copy)
@@ -1,19 +1,9 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    Compare decimal float values against variables of different types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 _Decimal32 d32;
 _Decimal64 d64;
@@ -59,7 +49,5 @@ main ()
 
   compare_dfp ();
 
-  if (failcnt)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-special-d32.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-special-d32.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-special-d32.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    C99 6.5.9 Equality operators.
@@ -11,5 +11,5 @@ int
 main ()
 {
   test_compares ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-special-d64.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-special-d64.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-special-d64.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    C99 6.5.9 Equality operators.
@@ -11,5 +11,5 @@ int
 main ()
 {
   test_compares ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/compare-special-d128.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/compare-special-d128.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/compare-special-d128.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.8 Relational operators.
    C99 6.5.9 Equality operators.
@@ -11,5 +11,5 @@ int
 main ()
 {
   test_compares ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/constants-zero.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/constants-zero.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/constants-zero.c	(working copy)
@@ -1,10 +1,10 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* Decimal float values can have significant trailing zeroes.  This is
    true for zero values as well.  Check that various representations of
    zero are handled correctly when specified as literal constants.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 int big_endian;
 
@@ -58,74 +58,74 @@ void
 dpd_tests (void)
 {
   if (! compare32 (0.DF, 0x22500000U))
-    abort ();
+    FAILURE
   if (! compare32 (-0.DF, 0xa2500000U))
-    abort ();
+    FAILURE
   if (! compare32 (0.E-4DF, 0x22100000U))
-    abort ();
+    FAILURE
   if (! compare32 (0.E-7DF, 0x21e00000U))
-    abort ();
+    FAILURE
   if (! compare32 (0.E+3DF, 0x22800000U))
-    abort ();
+    FAILURE
 
   if (! compare64 (0.DD, 0x2238000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (-0.DD, 0xa238000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (0.E-6DD, 0x2220000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (0.E-7DD, 0x221c000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (0.E+2DD, 0x2240000000000000ULL))
-    abort ();
+    FAILURE
 
   if (! compare128 (0.DL, 0x2208000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (-0.DL, 0xa208000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (0.E-3DL, 0x2207400000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (0.E-8DL, 0x2206000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (0.E+2DL, 0x2208800000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
 }
 
 void
 bid_tests (void)
 {
   if (! compare32 (0.DF, 0x32800000U))
-    abort ();
+    FAILURE
   if (! compare32 (-0.DF, 0xb2800000U))
-    abort ();
+    FAILURE
   if (! compare32 (0.E-4DF, 0x30800000U))
-    abort ();
+    FAILURE
   if (! compare32 (0.E-7DF, 0x2f000000U))
-    abort ();
+    FAILURE
   if (! compare32 (0.E+3DF, 0x34000000U))
-    abort ();
+    FAILURE
 
   if (! compare64 (0.DD, 0x31c0000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (-0.DD, 0xb1c0000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (0.E-6DD, 0x3100000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (0.E-7DD, 0x30e0000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare64 (0.E+2DD, 0x3200000000000000ULL))
-    abort ();
+    FAILURE
 
   if (! compare128 (0.DL, 0x3040000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (-0.DL, 0xb040000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (0.E-3DL, 0x303a000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (0.E-8DL, 0x3030000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
   if (! compare128 (0.E+2DL, 0x3044000000000000ULL, 0x0000000000000000ULL))
-    abort ();
+    FAILURE
 }
 
 int
@@ -138,7 +138,7 @@ main ()
   if ((sizeof (_Decimal64) != sizeof (long long))
       || (sizeof (_Decimal128) != 2 * sizeof (long long))
       || (sizeof (_Decimal32) != sizeof (_Decimal32)))
-    abort ();
+    FAILURE
 
   u32.d = 1.DF;
 
@@ -153,7 +153,7 @@ main ()
        bid_tests ();
     }
   else
-    abort ();		/* unknown format; test problem  */
+    FAILURE		/* unknown format; test problem  */
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-2.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* This test assumes IEEE float and double.  It also tests long double
    but makes no assumption about its size or range of values.  */
 
@@ -31,7 +29,5 @@ main ()
   CALL_VALID_ALL (t6)
   CALL_VALID_ALL (t7)
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-3.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-3.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-3.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* This test assumes IEEE float and double.  It also tests long double
    but makes no assumption about its size or range of values.  */
 
@@ -19,7 +17,5 @@ main ()
 {
   CALL_ZEROES_ALL (t)
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-4.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-4.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-4.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* This test assumes IEEE float and double.  It also tests long double
    but makes no assumption about its size or range of values.  */
 
@@ -19,7 +17,5 @@ main ()
 {
   CALL_INF_ALL (t)
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-5.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-5.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-5.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* This test assumes IEEE float and double.  It also tests long double
    but makes no assumption about its size or range of values.  */
 
@@ -19,7 +17,5 @@ main ()
 {
   CALL_NAN_ALL (t)
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-6.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-6.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-6.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-xfail-run-if "" { lax_strtofp } "*" "" } */
-/* { dg-options "-std=gnu99 -w" } */
+/* { dg-options "-w" } */
 
 /* This test assumes IEEE float and double.  */
 
@@ -174,7 +174,5 @@ main ()
       convert_364 ();
     }
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-7.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-7.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-7.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -w" } */
+/* { dg-options "-w" } */
 
 /* This test assumes IEEE float and double.  */
 
@@ -79,7 +79,5 @@ main ()
   convert_351 ();
   convert_352 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-8.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-8.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-8.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -w" } */
+/* { dg-options "-w" } */
 
 /* This test assumes IEEE float and double.  */
 
@@ -67,7 +67,5 @@ main ()
   convert_443 ();
   convert_444 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-9.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-9.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-9.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-xfail-run-if "" { lax_strtofp } "*" "" } */
-/* { dg-options "-std=gnu99 -w" } */
+/* { dg-options "-w" } */
 
 /* This test assumes IEEE float and double.  */
 
@@ -188,7 +188,5 @@ main ()
   convert_419 ();
   convert_420 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* This test assumes IEEE float and double.  */
 
 #define __STDC_WANT_DEC_FP__
@@ -108,7 +106,5 @@ main ()
   convert_246 ();
   convert_247 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-11.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-11.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-11.c	(working copy)
@@ -1,4 +1,3 @@
-/* { dg-options "-std=gnu99" } */
 /* { dg-skip-if "" { ! "powerpc*-*-linux*" } { "*" } { "" } } */
 
 /* Test decimal float conversions to and from IBM 128-bit long double. 
@@ -55,7 +54,5 @@ main ()
   convert_311 ();
   convert_312 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-12.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-12.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-12.c	(working copy)
@@ -1,9 +1,7 @@
 /* Test for bug where fold wrongly removed conversions to double and
    replaced them by conversions to float.  */
-/* { dg-options "-std=gnu99" } */
 
-extern void abort (void);
-extern void exit (int);
+#include "dfp-dbg.h"
 
 volatile float f = __builtin_inff ();
 volatile _Decimal32 d32 = 1e40DF;
@@ -12,6 +10,7 @@ int
 main (void)
 {
   if ((double) f == (double) d32)
-    abort ();
-  exit (0);
+    FAILURE
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c	(working copy)
@@ -1,9 +1,7 @@
 /* Test for bug where fold changed binary operation to decimal
    depending on typedefs.  */
-/* { dg-options "-std=gnu99" } */
 
-extern void abort (void);
-extern void exit (int);
+#include "dfp-dbg.h"
 
 volatile double d = 1.2345675;
 
@@ -15,6 +13,6 @@ main (void)
   _Decimal32 a = (d * d);
   d32 b = (d * d);
   if (a != b)
-    abort ();
-  exit (0);
+    FAILURE
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp-14.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp-14.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp-14.c	(working copy)
@@ -1,9 +1,7 @@
 /* Test for bug where fold narrowed decimal floating-point
    operations.  */
-/* { dg-options "-std=gnu99" } */
 
-extern void abort (void);
-extern void exit (int);
+#include "dfp-dbg.h"
 
 volatile _Decimal32 f = 1.23456DF;
 volatile _Decimal64 d = 1.23456DD;
@@ -12,6 +10,6 @@ int
 main (void)
 {
   if ((double)((_Decimal64)f * (_Decimal64)f) != (double)(d * d))
-    abort ();
-  exit (0);
+    FAILURE
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp.c	(working copy)
@@ -1,23 +1,12 @@
-/* { dg-options "-std=gnu99" } */
-
 /* N1150 5.2 Conversions among decimal floating types and between
    decimal floating types and generic floating types.
    C99 6.3.1.5(4) Conversions, arithmetic operands, real floating types.  */
 
 /* Long double isn't supported yet at runtime, so disable those checks.  */
 
-extern void abort (void);
-static int failcnt;
-static int skip_long_double;
+#include "dfp-dbg.h"
 
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+static int skip_long_double;
 
 volatile _Decimal32 d32;
 volatile _Decimal64 d64;
@@ -138,8 +127,5 @@ main ()
       || df > (2.9802322387695312e-08 + 0.00000000001))
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-complex.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-complex.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-complex.c	(working copy)
@@ -3,17 +3,7 @@
 /* N1150 5.3 Conversions between decimal floating and complex.
    C99 6.3.1.7 Conversions, arithmetic operands, real and complex.  */
 
-extern void abort(void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 int
 main ()
@@ -124,8 +114,5 @@ main ()
   if (d128 != 0.0625DL)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-dfp.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-dfp.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-dfp.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
    decimal floating types and generic floating types.
@@ -10,20 +10,9 @@
 #define __STDC_WANT_DEC_FP__ 1
 #endif
 
+#include "dfp-dbg.h"
 #include <float.h>
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
-
 volatile _Decimal32 d32;
 volatile _Decimal64 d64;
 volatile _Decimal128 d128;
@@ -101,8 +90,5 @@ main ()
   if (d64 != __builtin_infd64())
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-dfp-fold-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-dfp-fold-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-dfp-fold-2.c	(working copy)
@@ -1,9 +1,7 @@
 /* Test for bug where fold narrowed decimal floating-point
    operations.  */
-/* { dg-options "-std=gnu99" } */
 
-extern void abort (void);
-extern void exit (int);
+#include "dfp-dbg.h"
 
 volatile _Decimal32 f = 1.23456DF;
 volatile _Decimal64 d = 1.23456DD;
@@ -12,6 +10,6 @@ int
 main (void)
 {
   if ((_Decimal128)((_Decimal64)f * (_Decimal64)f) != (_Decimal128)(d * d))
-    abort ();
-  exit (0);
+    FAILURE
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-dfp-round.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-dfp-round.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-dfp-round.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-O0 -std=gnu99" } */
+/* { dg-options "-O0" } */
 /* { dg-skip-if "test is for emulation" { hard_dfp } { "*" } { "" } } */
 
 /* N1150 5.2: Conversions among decimal floating types and between
@@ -12,20 +12,9 @@
    Normally this would not be part of compiler testing, but conversions
    are currently handled in libgcc via decNumber.  */
 
+#include "dfp-dbg.h"
 #include "dfp-round.h"
 
-extern void abort (void);
-static int failcnt = 0;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
-
 _Decimal32 d32;
 _Decimal64 d64;
 _Decimal128 d128;
@@ -131,7 +120,5 @@ main ()
   if (!do_d128_to_d64 (-1.1111111111111125dl, -1.111111111111112dd)) FAILURE
   if (!do_d128_to_d64 (-1.1111111111111135dl, -1.111111111111113dd)) FAILURE
   
-  if (failcnt)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-int.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-int.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-int.c	(working copy)
@@ -1,17 +1,11 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* N1150 5.1 Conversion between decimal floating types and integer.
    C99 6.3.1.4(1a) New.  */
 
-extern void abort (void);
-int failcnt;
+#include "dfp-dbg.h"
 
-#ifdef DBG
-extern int printf (const char *, ...);
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#define BOOL _Bool
 
 _Decimal32 d32;
 _Decimal64 d64;
@@ -22,7 +16,7 @@ unsigned long long ull;
 int si;
 long sl;
 long long sll;
-_Bool b;
+BOOL b;
 
 void
 init_dfp_1 (void)
@@ -68,7 +62,7 @@ main ()
 {
   /* C99 Section 6.7.2 Type specifiers.  Type _Bool is 
      mentioned in this section.  Conversions between 
-     _Bool and DFP types.  */
+     BOOL and DFP types.  */
 
   /* Decimal float to unsigned integer.  */
   init_dfp_1 ();
@@ -105,7 +99,7 @@ main ()
 
   /* Decimal float to signed integer.  */
 
-  /* Decimal float to _Bool.  */
+  /* Decimal float to BOOL.  */
   init_dfp_2 ();
 
   b = d32;
@@ -184,7 +178,7 @@ main ()
   if (d128 != -1234567.dl)
     FAILURE
 
-  /* _Bool to decimal float.  */
+  /* BOOL to decimal float.  */
   init_dfp_3 ();
   
   b = d32;
@@ -197,8 +191,5 @@ main ()
   if (b)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-int-fold.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-int-fold.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-int-fold.c	(working copy)
@@ -1,9 +1,13 @@
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2" } */
 
 /* N1150 5.1 Conversion between decimal floating integer.
    C99 6.3.1.4(1a) New.
    These should all be folded at compile time.  */
 
+#include "dfp-dbg.h"
+
+#define BOOL _Bool
+
 extern void link_error (void);
 
 int
@@ -18,11 +22,11 @@ main ()
   int si;
   long sl;
   long long sll;
-  _Bool b;
+  BOOL b;
 
   /* C99 Section 6.7.2 Type specifiers.  Type _Bool is 
      mentioned in this section.  Conversions between 
-     _Bool and DFP types.  */
+     BOOL and DFP types.  */
 
   /* Decimal float to unsigned integer.  */
   d32 = 456.789df;
@@ -61,7 +65,7 @@ main ()
 
   /* Decimal float to signed integer.  */
 
-  /* Decimal float to _Bool.  */
+  /* Decimal float to BOOL.  */
   d32 = 1.23df;
   d64 = -3.4dd;
   d128 = 0.00003dl;
@@ -146,7 +150,7 @@ main ()
   if (d128 != -1234567.dl)
     link_error ();
 
-  /* _Bool to decimal float.  */
+  /* BOOL to decimal float.  */
   d32 = 0.0DF;
   d64 = 0.0DD;
   d128 = 0.0DL;
Index: gcc/testsuite/gcc.dg/dfp/convert-int-max.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-int-max.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-int-max.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0 -w" } */
 
 /* N1150 5.1 Conversions from decimal float to integer.  */
 
@@ -6,15 +6,7 @@
    what will fit into the destination type.  This assumes 32-bit int and
    64-bit long long (there's a check for that below).  */
 
-extern void abort (void);
-int failcnt;
-
-#ifdef DBG
-extern int printf (const char *, ...);
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 volatile _Decimal32 d32;
 volatile _Decimal64 d64;
@@ -150,7 +142,5 @@ main ()
 
   doit ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* N1150 5.1 Conversion between decimal floating integer.
    C99 6.3.1.4(1a) New.
    Test integer saturation.  */
@@ -8,11 +6,10 @@
 #define __STDC_WANT_DEC_FP__ 1
 #endif
 
+#include "dfp-dbg.h"
 #include <float.h>
 #include <limits.h>
 
-extern void abort (void);
-
 volatile _Decimal32 d32;
 volatile _Decimal64 d64;
 volatile _Decimal128 d128;
@@ -28,40 +25,40 @@ main ()
   /* Unsigned.  */
   usi = DEC32_MAX;  /* { dg-warning "overflow in implicit constant conversion" } */
   if (usi != UINT_MAX)
-    abort ();
+    FAILURE
 
   usi = DEC64_MAX;  /* { dg-warning "overflow in implicit constant conversion" } */
   if (usi != UINT_MAX)
-    abort ();
+    FAILURE
 
   usi = DEC128_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
   if (usi != UINT_MAX)
-    abort ();
+    FAILURE
 
   /* Signed.  */
   si = DEC32_MAX;	/* { dg-warning "overflow in implicit constant conversion" } */
   if (si != INT_MAX)
-    abort ();
+    FAILURE
 
   si = DEC64_MAX;   /* { dg-warning "overflow in implicit constant conversion" } */
   if (si != INT_MAX)
-    abort ();
+    FAILURE
 
   si = DEC128_MAX;  /* { dg-warning "overflow in implicit constant conversion" } */
   if (si != INT_MAX)
-    abort ();
+    FAILURE
 
   si = - DEC32_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
   if (si != INT_MIN)
-    abort ();
+    FAILURE
 
   si = - DEC64_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
   if (si != INT_MIN)
-    abort ();
+    FAILURE
 
   si = - DEC128_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
   if (si != INT_MIN)
-    abort ();
+    FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/decfloat-constants.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/decfloat-constants.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/decfloat-constants.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* N1150 4: Characteristics of decimal floating types <float.h>.
    C99 5.2.4.2.2a[3]: New.
 
@@ -11,20 +9,9 @@
 #define __STDC_WANT_DEC_FP__ 1
 #endif
 
+#include "dfp-dbg.h"
 #include <float.h>
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
-
 int main ()
 {
   if (DEC32_MANT_DIG != 7) FAILURE
@@ -56,8 +43,5 @@ int main ()
   if (DEC128_SUBNORMAL_MIN != 0.000000000000000000000000000000001E-6143DL)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/fe-binop.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/fe-binop.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/fe-binop.c	(working copy)
@@ -1,4 +1,3 @@
-/* { dg-options "-std=gnu99" } */
 /* { dg-skip-if "test is for emulation" { hard_dfp } { "*" } { "" } } */
 
 /* Touch tests that check for raising appropriate exceptions for binary
@@ -102,7 +101,5 @@ main ()
   binop_501 ();
   binop_502 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/fe-convert-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/fe-convert-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/fe-convert-1.c	(working copy)
@@ -1,4 +1,3 @@
-/* { dg-options "-std=gnu99" } */
 /* { dg-skip-if "test is for emulation" { hard_dfp } { "*" } { "" } } */
 
 /* Check that appropriate exceptions are raised for conversions involving
@@ -37,7 +36,5 @@ main ()
   convert_121 ();
   convert_122 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/fe-convert-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/fe-convert-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/fe-convert-2.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* Check that appropriate exceptions are raised for BFP to DFP conversions.
    The test only uses double and _Decimal32; tests for conversions to
    _Decimal64 would need 128-bit long double.  */
@@ -29,7 +27,5 @@ main ()
   convert_104 ();
   convert_105 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/fe-convert-3.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/fe-convert-3.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/fe-convert-3.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* Check that appropriate exceptions are raised for int to DFP conversions.  */
 
 #include "fe-check.h"
@@ -43,7 +41,5 @@ main ()
   convert_210 ();
   convert_211 ();
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-array.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-array.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-array.c	(working copy)
@@ -1,19 +1,7 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test passing array elements involving decimal floating point types. */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* A handful of functions that return the Nth _Decimal32 argument of
    an incoming array.  */
@@ -165,8 +153,5 @@ int main()
   if (arg4_128 (d128) != 4.0dl) FAILURE
   if (arg5_128 (d128) != 5.0dl) FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-deref.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-deref.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-deref.c	(working copy)
@@ -1,20 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test scalar passing and return values involving decimal floating
    point types and dereferenced pointers.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* A handful of functions that return their Nth _Decimal32
    argument.  */
@@ -213,8 +201,5 @@ main ()
   if (arg5_128 (*pdl0, *pdl1, *pdl2, *pdl3, *pdl4, *pdl5) != 5.0dl)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-mixed.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-mixed.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-mixed.c	(working copy)
@@ -1,20 +1,10 @@
-/* { dg-options "-std=gnu99 -Wall" } */
+/* { dg-options "-Wall" } */
 
 /* C99 6.5.2.2 Function calls.
    Test scalar passing and return values involving decimal floating
    point types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* A handful of functions that return their Nth _Decimal32
    argument with mixed types in parameter list.  */
@@ -180,8 +170,5 @@ main ()
   if (arg4_128 (0, -1, 2.0f, 3.0, 4.0dl, 5.0l) != 4.0dl) FAILURE
   if (arg5_128 (0, -1, 2.0f, 3.0, 4.0l, 5.0dl) != 5.0dl) FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-pointer.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-pointer.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-pointer.c	(working copy)
@@ -1,20 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test pointer argument passing and return values involving decimal floating
    point types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* A handful of functions that return their Nth pointer to Decimal32
    argument.  */
@@ -213,8 +201,5 @@ main ()
   if (*arg5_128 (pdl0, pdl1, pdl2, pdl3, pdl4, pdl5) != 5.0dl)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-scalar.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-scalar.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-scalar.c	(working copy)
@@ -1,20 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test scalar passing and return values involving decimal floating
    point types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* A handful of functions that return their Nth _Decimal32
    argument.  */
@@ -200,8 +188,5 @@ main ()
   if (arg5_128 (0.0dl, 1.0dl, 2.0dl, 3.0dl, 4.0dl, 5.0dl) != 5.0dl)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-struct.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-struct.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-struct.c	(working copy)
@@ -1,20 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test structure passing and return values involving decimal floating
    point types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 struct example
 {
@@ -101,8 +89,5 @@ main ()
   if (ptr_dummy1_field (&nums) != 'a') FAILURE
   if (ptr_dummy2_field (&nums) != 'b') FAILURE
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h	(working copy)
@@ -1,14 +1,9 @@
 /* Simple test of vararg passing for problematic types with and without
    double values passed between them.  */
 
+#include "dfp-dbg.h"
 #include <stdarg.h>
-#ifdef DBG
-#include <stdio.h>
-#endif
 
-extern void abort (void);
-
-int failcnt;
 DTYPE a[10];
 double b[10];
 
@@ -28,6 +23,7 @@ compare (double r, double s, int *p, int
       {
 	int j;
 
+	failures++;
 	printf ("line %-3d", line);
 	for (j = 0; j < n; j++)
 	  printf ("  %08x", p[j]);
@@ -39,7 +35,7 @@ compare (double r, double s, int *p, int
 	return;
       }
 #else
-      abort ();
+      __builtin_abort ();
 #endif
 }
 
@@ -102,7 +98,7 @@ doit ()
       printf ("test error: INTS = %d, sizeof (DTYPE) =  %d\n",
 	      INTS, sizeof (DTYPE));
 #endif
-      abort ();
+      __builtin_abort ();
     }
 
   x = ONE / THREE;
@@ -144,7 +140,4 @@ doit ()
   u1.d = x; u2.d = a[0]; compare (1.5, b[0], u1.i, u2.i, INTS, __LINE__);
   u1.d = y; u2.d = a[1]; compare (2.5, b[1], u1.i, u2.i, INTS, __LINE__);
   u1.d = z; u2.d = a[2]; compare (3.5, b[2], u1.i, u2.i, INTS, __LINE__);
-
-  if (failcnt != 0)
-    abort ();
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d32.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d32.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d32.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* Simple test of vararg passing for problematic types with and without
    double values passed between them.  */
 
@@ -16,5 +14,6 @@ int
 main ()
 {
   doit ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d64.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d64.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d64.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* Simple test of vararg passing for problematic types with and without
    double values passed between them.  */
 
@@ -16,5 +14,6 @@ int
 main ()
 {
   doit ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d128.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d128.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d128.c	(working copy)
@@ -1,5 +1,3 @@
-/* { dg-options "-std=gnu99" } */
-
 /* Simple test of vararg passing for problematic types with and without
    double values passed between them.  */
 
@@ -16,5 +14,6 @@ int
 main ()
 {
   doit ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d128-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d128-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-alternate-d128-2.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-options "-std=gnu99 -mpreferred-stack-boundary=2" } */
+/* { dg-options "-mpreferred-stack-boundary=2" } */
 
 /* Simple test of vararg passing for problematic types with and without
    double values passed between them.  */
@@ -17,5 +17,6 @@ int
 main ()
 {
   doit ();
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c	(working copy)
@@ -1,21 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test passing varargs of the decimal float types.  */
 
 #include <stdarg.h>
-
-extern void abort (void);
-static int failcnt = 0;
-                                                                                
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 static _Decimal32
 vararg32 (unsigned arg, ...)
@@ -104,7 +91,5 @@ int main()
   if (vararg128 (5, 0.0dl, 1.0dl, 2.0dl, 3.0dl, 4.0dl, 5.0dl) != 5.0dl)
     FAILURE
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c	(working copy)
@@ -1,22 +1,9 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.
    Test passing varargs of the combination of decimal float types and
    other types.  */
 
 #include <stdarg.h>
-
-extern void abort (void);
-static int failcnt = 0;
-                                                                                
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* Supposing the list of varying number of arguments is:
    unsigned int, _Decimal128, double, _Decimal32, _Decimal64.  */
@@ -111,7 +98,5 @@ main ()
   if (vararg_int (0, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 0) FAILURE
   if (vararg_double (2, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 2.0) FAILURE
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-mixed-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-mixed-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-mixed-2.c	(working copy)
@@ -1,23 +1,12 @@
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-options "-std=gnu99 -mpreferred-stack-boundary=2" } */
+/* { dg-options "-mpreferred-stack-boundary=2" } */
 
 /* C99 6.5.2.2 Function calls.
    Test passing varargs of the combination of decimal float types and
    other types.  */
 
 #include <stdarg.h>
-
-extern void abort (void);
-static int failcnt = 0;
-                                                                                
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 /* Supposing the list of varying number of arguments is:
    unsigned int, _Decimal128, double, _Decimal32, _Decimal64.  */
@@ -112,7 +101,5 @@ main ()
   if (vararg_int (0, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 0) FAILURE
   if (vararg_double (2, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 2.0) FAILURE
 
-  if (failcnt != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/func-vararg-size0.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/func-vararg-size0.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/func-vararg-size0.c	(working copy)
@@ -1,10 +1,7 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.2.2 Function calls.  */
 
 #include <stdarg.h>
-
-extern void abort (void);
+#include "dfp-dbg.h"
 
 struct S1
 {
@@ -38,7 +35,7 @@ main ()
   struct S1 a1[5];
 
   if (check_var(5, 1.0, s1, 2LL, a1[2], a1[2]) == 0)
-    abort ();
+    FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/inf-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/inf-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/inf-1.c	(working copy)
@@ -1,63 +1,61 @@
-/* { dg-options "-std=gnu99" } */
-
 /* N1150 4: Characteristics of decimal floating types (not explicit)
    C99 5.2.4.2.2: Characteristics of floating types.
    A few simple checks on arithmetic operations. */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 int main()
 {
   /* Assumes rounding mode. */
   if (9999999.E90DF + 1.E90df != __builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (!__builtin_isinfd32 (9999999.E90DF + 1.E90df))
-    abort ();
+    FAILURE
 
   if (9.999999999999999E384dd + .000000000000001e384dd 
       != __builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (-9999999.E90DF - 1.E90df != -__builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (!__builtin_isinfd32 (9.999999999999999E384dd + .000000000000001e384dd))
-    abort ();
+    FAILURE
 
   if (7.999999999999999999999999999999999E6144dl + 3.0E6144dl
       != __builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (__builtin_infd32 () * __builtin_infd32 () != __builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (__builtin_infd32 () * 2 != __builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (__builtin_infd64 () * -5 != -__builtin_infd32 ())
-    abort ();
+    FAILURE
 
   if (!__builtin_isinfd128 (__builtin_infd32 () / 4))
-    abort ();
+    FAILURE
 
   if (__builtin_infd64 () != __builtin_infd128 ())
-    abort ();
+    FAILURE
 
   if (!__builtin_isinfd64 (__builtin_infd128 ()))
-    abort ();
+    FAILURE
 
   if (__builtin_finited64 (__builtin_infd32 () * 4))
-    abort ();
+    FAILURE
 
   if (!__builtin_finited128 (9.999999E90DL - 1.E90dd))
-    abort ();
+    FAILURE
 
   if (__builtin_finited128 (__builtin_infd32 () *__builtin_infd128 ()))
-    abort ();
+    FAILURE
 
   if (__builtin_finited32 (__builtin_nand32 ("")))
-    abort ();
-    
-  return 0;
+    FAILURE
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/loop-index.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/loop-index.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/loop-index.c	(working copy)
@@ -1,9 +1,8 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.8.5.2: The for statement.  */
 
 #include <stdio.h>
 #include <stdlib.h>
+#include "dfp-dbg.h"
 
 void
 f32 (void)
@@ -15,7 +14,7 @@ f32 (void)
     i++;
 
   if (i != 5)
-    abort();
+    FAILURE
 }
 
 void
@@ -28,7 +27,7 @@ f64 (void)
     i++;
 
   if (i != 5)
-    abort();
+    FAILURE
 }
 
 void
@@ -41,7 +40,7 @@ f128 (void)
     i++;
 
   if (i != 5)
-    abort();
+    FAILURE
 }
 
 int
@@ -53,5 +52,6 @@ main ()
   f64 ();
   f128 ();
   
+  FINISH
   return (0);
 }
Index: gcc/testsuite/gcc.dg/dfp/nan-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/nan-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/nan-1.c	(working copy)
@@ -1,108 +1,106 @@
-/* { dg-options "-std=gnu99" } */
-
 /* N1150 4: Characteristics of decimal floating types (not explicit)
    C99 5.2.4.2.2: Characteristics of floating types.
    A few simple checks on arithmetic operations. */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 int main()
 {
   /* Some possibly non-obvious tests, but most logical
      operations on NaN return false, including NaN == NaN. */
   if (__builtin_nand32("") == __builtin_nand32(""))
-    abort();
+    FAILURE
 
   if (__builtin_nand64("") == __builtin_nand64(""))
-    abort();
+    FAILURE
 
   if (__builtin_nand128("") == __builtin_nand128(""))
-    abort();
+    FAILURE
   
   if (!(__builtin_nand32("") != __builtin_nand32("")))
-    abort();
+    FAILURE
 
   if (!(__builtin_nand64("") != __builtin_nand64("")))
-    abort();
+    FAILURE
 
   if (!(__builtin_nand128("") != __builtin_nand128("")))
-    abort();
+    FAILURE
 
   if (__builtin_nand32("") > __builtin_nand32(""))
-    abort();
+    FAILURE
 
   if (__builtin_nand64("") >= __builtin_nand64(""))
-    abort();
+    FAILURE
 
   if (__builtin_nand128("") <  __builtin_nand128(""))
-    abort();
+    FAILURE
 
   if (-__builtin_nand128("") <  +__builtin_nand128(""))
-    abort();
+    FAILURE
 
   /* 0.0/0.0 => NaN, but NaN != NaN.  */
   if (0.0df/0.0dl == __builtin_nand32(""))
-    abort();
+    FAILURE
 
   /* 0.0 * INF => NaN.  */
   if (!__builtin_isnand32 (0.0df * __builtin_infd32()))
-    abort ();
+    FAILURE
 
   if (!__builtin_isnand64 (0.0dd * __builtin_infd64()))
-    abort ();
+    FAILURE
 
   if (!__builtin_isnand128 (0.0dd * __builtin_infd128()))
-    abort ();
+    FAILURE
 
   /* INF - INF => NaN.  */
   if (!__builtin_isnand32 (__builtin_infd32() - __builtin_infd32()))
-    abort ();
+    FAILURE
 
   if (!__builtin_isnand64 (__builtin_infd64() - __builtin_infd64()))
-    abort ();
+    FAILURE
 
   if (!__builtin_isnand128 (__builtin_infd128() - __builtin_infd128()))
-    abort ();
+    FAILURE
 
   /* INF/INF => NaN.  */
   if (!__builtin_isnand32 (__builtin_infd32()/__builtin_infd32()) )
-    abort ();
+    FAILURE
 
   if (!__builtin_isnand64 (__builtin_infd64()/__builtin_infd64()) )
-    abort ();
+    FAILURE
 
   if (!__builtin_isnand128 (__builtin_infd128()/__builtin_infd128()) )
-    abort ();
+    FAILURE
   
   /* 0.0/0.0 => NaN, but NaN != NaN.  */
   if ((0.0dd/0.0df) == (0.0dd/0.0df))
-    abort();
+    FAILURE
 
   if (__builtin_nand32("") <  __builtin_infd32())
-    abort();
+    FAILURE
 
   if (__builtin_nand32("") >=  __builtin_infd32())
-    abort();
+    FAILURE
 
   /* Fixme: Add sqrtdf(-x.df) test when sqrt is supported. */
 
   if (!__builtin_isnand32(__builtin_nand32("")))
-    abort();
+    FAILURE
 
   if (!__builtin_isnand64(__builtin_nand64("")))
-    abort();
+    FAILURE
 
   if (!__builtin_isnand128(__builtin_nand128("")))
-    abort();
+    FAILURE
 
   if (!__builtin_isnand128(8.0df * __builtin_nand128("")))
-    abort();
+    FAILURE
 
   if (!__builtin_isnand32(8.1dl - __builtin_nand32("")))
-    abort();
+    FAILURE
 
   if (!__builtin_isnand128(__builtin_nand64("") + __builtin_nand128("")))
-    abort();
+    FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/nan-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/nan-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/nan-2.c	(working copy)
@@ -1,11 +1,9 @@
-/* { dg-options "-std=gnu99" } */
-
 /* N1150 4: Characteristics of decimal floating types (not explicit)
    C99 5.2.4.2.2: Characteristics of floating types.
    A few simple checks on arithmetic operations.  Based on nan-1.c with
    the consideration of negative zero.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 int main()
 {
@@ -17,39 +15,39 @@ int main()
      result.  */
   d32 = 123.45f;
   if (d32/-0.0df != -__builtin_infd32())
-    abort();
+    FAILURE
   if (123.45df/-0.0df != -__builtin_infd32())
-    abort();
+    FAILURE
   
   d64 = 123.45f;
   if (d64/-0.0dd != -__builtin_infd64())
-    abort();
+    FAILURE
   if (123.45dd/-0.0dd !=  -__builtin_infd64())
-    abort();
+    FAILURE
 
   d128 = 123.45f;
   if (d128/-0.0dl != -__builtin_infd64())
-    abort();
+    FAILURE
   if (123.45dl/-0.0dl != -__builtin_infd128())
-    abort();
+    FAILURE
 
   d32 = 0.0df;
   if (!__builtin_isnand32(-(d32/-0.0df)))
-    abort();
+    FAILURE
   if (!__builtin_isnand32(-(0.0df/-0.0df)))
-    abort();
+    FAILURE
 
   d64 = 0.0dd;
   if (!__builtin_isnand64(-(d64/-0.0dd)))
-    abort();
+    FAILURE
   if (!__builtin_isnand64(-(0.0dd/-0.0dd)))
-    abort();
+    FAILURE
 
   d128 = 0.0dl;
   if (!__builtin_isnand128(-(d128/-0.0dl)))
-    abort();
+    FAILURE
   if (!__builtin_isnand128(-(0.0dl/-0.0dl)))
-    abort();
+    FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-options "-O2" } */
 
 /* C99 6.5.5: Multiplicative operators.
    C99 6.5.6: Additive operators.  */
Index: gcc/testsuite/gcc.dg/dfp/operator-assignment.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-assignment.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-assignment.c	(working copy)
@@ -1,21 +1,9 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.16 Assignment operators.
    Verify the compound assignment operator for decimal float types,
    using it with other decimal float types, integers, and other binary
    float types cast to decimal float types.  */
 
-extern void abort (void);
-static int failcnt;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 #define OPERATE(OPRD1,OPRT,OPRD2,RLT)		\
   if (( OPRD1 OPRT OPRD2 )!= RLT)		\
@@ -64,8 +52,5 @@ main ()
   DECIMAL_COMPOUND_ASSIGNMENT(64, d64);
   DECIMAL_COMPOUND_ASSIGNMENT(128, d128);
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/operator-comma.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-comma.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-comma.c	(working copy)
@@ -1,19 +1,9 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.17: Comma operator.
    Test with decimal float operands.  */
 
-extern void abort (void);
-static int failcnt = 0;
-                                                                                
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 volatile _Decimal32 d32a, d32b, d32c;
 volatile _Decimal64 d64a, d64b, d64c;
@@ -53,5 +43,5 @@ main ()
   if (d64a != 12.0dd)
     FAILURE;
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/operator-cond.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-cond.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-cond.c	(working copy)
@@ -1,19 +1,9 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* C99 6.5.15 Conditional operator.
    Test with decimal float operands.  */
 
-extern void abort (void);
-static int failcnt = 0;
-                                                                                
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 volatile _Decimal32 d32a, d32b, d32c;
 volatile _Decimal64 d64a, d64b, d64c;
@@ -63,5 +53,5 @@ main ()
   if (d128a != d128b)
     FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/operator-logical.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-logical.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-logical.c	(working copy)
@@ -1,16 +1,14 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 Logical AND operator.
    C99 Logical OR operator.
    Test with decimal float operands.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 #define OPERATE(OPRD1,OPRT,OPRD2,RLT)	\
 do					\
 {					\
   if (( (OPRD1) OPRT (OPRD2) )!= RLT)	\
-    abort ();				\
+    __builtin_abort ();			\
 } while (0)
 
 #define DECIMAL_LOGICAL_OR(OPRD)	\
Index: gcc/testsuite/gcc.dg/dfp/operator-unary.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/operator-unary.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/operator-unary.c	(working copy)
@@ -1,23 +1,21 @@
-/* { dg-options "-std=gnu99" } */
-
 /* C99 6.5.3 Unary operators.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 #define AUTO_INCREASE_DECREASE(TYPE,SUFFIX)   		\
 do                                            		\
 {                                             		\
-  _Decimal##TYPE in_de_d##TYPE = 0.0##SUFFIX;         	\
-  if (in_de_d##TYPE++) abort ();              		\
-  if (--in_de_d##TYPE) abort ();              		\
-  if (++in_de_d##TYPE == 0.0##SUFFIX) abort (); 	\
-  if (in_de_d##TYPE-- == 0.0##SUFFIX) abort (); 	\
+  _Decimal##TYPE in_de_d##TYPE = 0.0##SUFFIX;		\
+  if (in_de_d##TYPE++) FAILURE				\
+  if (--in_de_d##TYPE) FAILURE				\
+  if (++in_de_d##TYPE == 0.0##SUFFIX) FAILURE		\
+  if (in_de_d##TYPE-- == 0.0##SUFFIX) FAILURE		\
 } while(0)
 
 #define UNARY_OPERATOR(TYPE,SUFFIX)           		\
 do                                            		\
 {                                             		\
- _Decimal##TYPE unary_d##TYPE = 1.0##SUFFIX;  		\
+ _Decimal##TYPE unary_d##TYPE = 1.0##SUFFIX;		\
  _Decimal##TYPE* unary_dp##TYPE;              		\
  /*  & operator.  */                          		\
  unary_dp##TYPE = &(unary_d##TYPE);           		\
@@ -25,11 +23,11 @@ do                                      
  unary_d##TYPE = *(unary_dp##TYPE);           		\
  /*  - operator.  */                          		\
  unary_d##TYPE = -unary_d##TYPE;              		\
- if (unary_d##TYPE != -1.0##SUFFIX) abort ();         	\
+ if (unary_d##TYPE != -1.0##SUFFIX) FAILURE		\
  /*  + operator.  */                          		\
  unary_d##TYPE = +unary_d##TYPE;              		\
- if (unary_d##TYPE != -1.0##SUFFIX) abort ();         	\
- if (!unary_d##TYPE) abort (); /*! operator.  */ 	\
+ if (unary_d##TYPE != -1.0##SUFFIX) FAILURE		\
+ if (!unary_d##TYPE) FAILURE	/*! operator.  */ 	\
 } while (0)
 
 int
@@ -46,9 +44,9 @@ main ()
   UNARY_OPERATOR(128, DL);
 
   /*  C99 6.5.3 Unary operators for zero values.  */
-  if (- +0.df != -0.df) abort ();
-  if (+ -0.df != -0.df) abort ();
-  if (- -0.df != +0.df) abort ();
+  if (- +0.df != -0.df) FAILURE
+  if (+ -0.df != -0.df) FAILURE
+  if (- -0.df != +0.df) FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/pr36800.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr36800.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr36800.c	(working copy)
@@ -1,26 +1,25 @@
 /* { dg-do run } */
-/* { dg-options "-std=gnu99" } */
 
 #include <stdarg.h>
-extern void abort (void);
+#include "dfp-dbg.h"
 
 void
 f (int a, ...)
 {
   va_list ap;
   if (a != 0)
-    abort ();
+    FAILURE
   va_start (ap, a);
   if (va_arg (ap, _Decimal128) != 1.2DL)
-    abort ();
+    FAILURE
   if (va_arg (ap, _Decimal128) != 2.34DL)
-    abort ();
+    FAILURE
   if (va_arg (ap, _Decimal128) != 3.456DL)
-    abort ();
+    FAILURE
   if (va_arg (ap, _Decimal128) != 4.567DL)
-    abort ();
+    FAILURE
   if (va_arg (ap, double) != 5.125)
-    abort ();
+    FAILURE
   va_end (ap);
 }
 
@@ -28,5 +27,6 @@ int
 main (void)
 {
   f (0, 1.2DL, 2.34DL, 3.456DL, 4.567DL, 5.125);
-  return 0;
+
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/pr39034.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr39034.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr39034.c	(working copy)
@@ -1,19 +1,10 @@
 /* { dg-do run } */
-/* { dg-options "-std=gnu99 -O" } */
+/* { dg-options "-O" } */
 
 /* DFP TR 24732 == WG14 / N1176, N1312 */
 /* Based on a test from Fred Tydeman.  */
 
-extern void abort (void);
-int failures = 0;
-
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE(MSG) { printf ("line %d: %s\n", __LINE__, MSG); failures++; }
-#else
-#define FAILURE(MSG) failures++;
-#endif
-
+#include "dfp-dbg.h"
 
 /* Test runtime computations.  */
 
@@ -25,9 +16,9 @@ runtime32 (void)
   _Decimal32 d32 = (float)((v1/v2-v3) - (v4/v5-v6));
 
   if (b32)
-    FAILURE ("runtime: b32 should be zero")
+    FAILURE
   if (d32)
-    FAILURE ("runtime: d32 should be zero")
+    FAILURE
 }
 
 void
@@ -38,9 +29,9 @@ runtime64 (void)
   _Decimal64 d64 = (double)((v1/v2-v3) - (v4/v5-v6));
 
   if (b64)
-    FAILURE ("runtime: b64 should be zero")
+    FAILURE
   if (d64)
-    FAILURE ("runtime: d64 should be zero")
+    FAILURE
 }
 
 void
@@ -52,9 +43,9 @@ runtime128 (void)
   _Decimal128 d128 = (long double)((v1/v2-v3) - (v4/v5-v6));
 
   if (b128)
-    FAILURE ("runtime: b128 should be zero")
+    FAILURE
   if (d128)
-    FAILURE ("runtime: d128 should be zero")
+    FAILURE
 }
 
 /* Test constant folding.  */
@@ -66,9 +57,9 @@ fold32 (void)
   _Decimal32 b32 = (float)((28.f/3.f-9.f) - (31.f/3.f-10.f));
 
   if (b32)
-    FAILURE ("fold: b32 should be zero")
+    FAILURE
   if (d32)
-    FAILURE ("fold: d32 should be zero")
+    FAILURE
 }
 
 void
@@ -78,9 +69,9 @@ fold64 (void)
   _Decimal64 d64 = (double)((28./3.-9.) - (31./3.-10.));
 
   if (b64)
-    FAILURE ("fold: b64 should be zero")
+    FAILURE
   if (d64)
-    FAILURE ("fold: d64 should be zero")
+    FAILURE
 }
 
 void
@@ -90,9 +81,9 @@ fold128 (void)
   _Decimal128 d128 = (long double)((28./3.-9.) - (31./3.-10.));
 
   if (b128)
-    FAILURE ("fold: b128 should be zero")
+    FAILURE
   if (d128)
-    FAILURE ("fold: d128 should be zero")
+    FAILURE
 }
 
 int
@@ -105,7 +96,5 @@ main ()
   fold64 ();
   fold128 ();
 
-  if (failures != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/pr39035.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr39035.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr39035.c	(working copy)
@@ -1,18 +1,10 @@
 /* { dg-do run } */
-/* { dg-options "-std=gnu99 -O" } */
+/* { dg-options "-O" } */
 
 /* DFP TR 24732 == WG14 / N1176, N1312 */
 /* Based on a test from Fred Tydeman.  */
 
-extern void abort (void);
-int failures = 0;
-
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE(MSG) { printf ("line %d: %s\n", __LINE__, MSG); failures++; }
-#else
-#define FAILURE(MSG) failures++;
-#endif
+#include "dfp-dbg.h"
 
 /* Test runtime computations.  */
 
@@ -22,7 +14,7 @@ runtime32 (void)
   volatile _Decimal32 d;
   d = 0.0DF;
   if (d)
-    FAILURE ("0.0DF should be zero")
+    FAILURE
 }
 
 void
@@ -31,7 +23,7 @@ runtime64 (void)
   volatile _Decimal64 d;
   d = 0.0DD;
   if (d)
-    FAILURE ("0.0DD should be zero")
+    FAILURE
 }
 
 void
@@ -40,28 +32,28 @@ runtime128 (void)
   volatile _Decimal128 d;
   d = 0.0DL;
   if (d)
-    FAILURE ("0.0DL should be zero")
+    FAILURE
 }
 
 void
 fold32 (void)
 {
   if (0.0DF)
-    FAILURE ("0.0DF should be zero")
+    FAILURE
 }
 
 void
 fold64 (void)
 {
   if (0.0DD)
-    FAILURE ("0.0DD should be zero")
+    FAILURE
 }
 
 void
 fold128 (void)
 {
   if (0.0DL)
-    FAILURE ("0.0DL should be zero")
+    FAILURE
 }
 
 int
@@ -75,7 +67,5 @@ main(void)
   fold64 ();
   fold128 ();
 
-  if (failures != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/pr39902.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/pr39902.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/pr39902.c	(working copy)
@@ -1,18 +1,8 @@
-/* { dg-options "--std=gnu99" } */
-
 /* Check that optimizations like (x * 1) to x, or (x * -1) to -x,
    do not apply to decimal float computations where trailing zeroes
    are significant.  */
 
-extern void abort (void);
-int failcnt;
-
-#ifdef DBG
-extern int printf (const char *, ...);
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 #define COMPARE32(A,B) \
   A.i == B.i
@@ -232,8 +222,5 @@ main (void)
   doit64 ();
   doit128 ();
 
-  if (failcnt != 0)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/signbit-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/signbit-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/signbit-1.c	(working copy)
@@ -1,16 +1,8 @@
-/* { dg-options "-O0 -std=gnu99" } */
+/* { dg-options "-O0" } */
 
 /* Decimal float versions of __builtin_signbit.  */
 
-extern void abort (void);
-int failures;
-
-#ifdef DBG
-extern int printf (const char *, ...);
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failures++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 #define CHECK32(D,I) \
   if ((__builtin_signbitd32 (D) != 0) != I) FAILURE
@@ -44,7 +36,5 @@ main ()
   td = 0.0dl;  CHECK128 (td, 0)
   td = -0.0dl; CHECK128 (td, 1)
 
-  if (failures != 0)
-    abort ();
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/signbit-2.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/signbit-2.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/signbit-2.c	(working copy)
@@ -1,9 +1,9 @@
-/* { dg-options "-O0 -std=gnu99" } */
+/* { dg-options "-O0" } */
 
 /* Check that the compiler uses builtins for signbit; if not the link
    will fail because library functions are in libm.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 volatile _Decimal32 sd = 2.3df;
 volatile _Decimal64 dd = -4.5dd;
@@ -22,12 +22,12 @@ extern int signbitd128 (_Decimal128);
 int
 main ()
 {
-  if (signbitf (f) != 0) abort ();
-  if (signbit (d) == 0) abort ();
-  if (signbitl (ld) != 0) abort ();
-  if (signbitd32 (sd) != 0) abort ();
-  if (signbitd64 (dd) == 0) abort ();
-  if (signbitd128 (tf) != 0) abort ();
+  if (signbitf (f) != 0) FAILURE
+  if (signbit (d) == 0) FAILURE
+  if (signbitl (ld) != 0) FAILURE
+  if (signbitd32 (sd) != 0) FAILURE
+  if (signbitd64 (dd) == 0) FAILURE
+  if (signbitd128 (tf) != 0) FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/struct-layout-1.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/struct-layout-1.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/struct-layout-1.c	(working copy)
@@ -1,8 +1,5 @@
-/* { dg-options "-std=gnu99" } */
-
 #include <stdarg.h>
-
-extern void abort (void);
+#include "dfp-dbg.h"
 
 struct S1
 {
@@ -39,20 +36,6 @@ struct S5
   } a;
 };
 
-static int failcnt = 0;
-
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE do                             \
-{ printf ("failed at line %d\n", __LINE__);    \
-  failcnt++;                                   \
-}while(0)
-#else
-#define FAILURE abort ()
-#endif
-
 int check_var (int z, ...)
 {
   long long result;
@@ -84,8 +67,5 @@ int main ()
   if (check_var (2, s5, 2LL) == 0)
     FAILURE;
 
-  if (failcnt)
-    abort ();
-
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/union-init.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/union-init.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/union-init.c	(working copy)
@@ -1,8 +1,6 @@
-/* { dg-options "-std=gnu99" } */
-
 /* Cast to union is a GNU C extension.  */
 
-extern void abort (void);
+#include "dfp-dbg.h"
 
 union u
 {
@@ -30,10 +28,10 @@ int main ()
   double d;
   
   if (u1.d128 != 0.0dl)
-    abort ();
+    FAILURE
 
   if (u2.d128 != 4.2dl)
-    abort ();
+    FAILURE
 
   /* cast decimal floating point to union type.  */
   d128 = 1.23dl;
@@ -42,19 +40,19 @@ int main ()
 
   u4 = (union u) d128;
   if (u4.d128 != 1.23dl)
-    abort ();
+    FAILURE
   
   u4 = (union u) d;
   if (u4.d != 3.25)
-    abort ();
+    FAILURE
 
   n1 = (union n) d64;
   if (n1.d64 != 4.56dd)
-    abort ();
+    FAILURE
   
   n1 = (union n)d;
   if (n1.d != 3.25)
-    abort ();
+    FAILURE
 
-  return 0;
+  FINISH
 }
Index: gcc/testsuite/gcc.dg/dfp/usual-arith-conv.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/usual-arith-conv.c	(revision 151725)
+++ gcc/testsuite/gcc.dg/dfp/usual-arith-conv.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-options "-O0" } */
 
 /* N1150 5.4: Usual arithmetic conversions.
    C99 6.3.1.8[1] (New).
@@ -6,17 +6,7 @@
    Test arithmetic operators with different decimal float types, and
    between decimal float types and integer types.  */
 
-extern void abort (void);
-static int failcnt = 0;
-                                                                                
-/* Support compiling the test to report individual failures; default is
-   to abort as soon as a check fails.  */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
+#include "dfp-dbg.h"
 
 volatile _Decimal32 d32a, d32b, d32c;
 volatile _Decimal64 d64a, d64b, d64c;
@@ -123,5 +113,5 @@ main ()
   if (d128a != d128c / 2.0dl)
     FAILURE
 
-  return 0;
+  FINISH
 }




More information about the Gcc-patches mailing list