summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/dfp/pr39035.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/dfp/pr39035.c')
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr39035.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/gcc/testsuite/gcc.dg/dfp/pr39035.c b/gcc/testsuite/gcc.dg/dfp/pr39035.c
index 2d44e06a432..2c9e8b386ed 100644
--- a/gcc/testsuite/gcc.dg/dfp/pr39035.c
+++ b/gcc/testsuite/gcc.dg/dfp/pr39035.c
@@ -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
}