OSDN Git Service

* gcc.dg/dfp/func-array.c: Support -DDBG to report individual failures.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / dfp / operator-assignment.c
index 8e8a922..49d15d2 100644 (file)
@@ -6,10 +6,20 @@
    float types cast to decimal float types.  */
 
 extern void abort (void);
    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
 
 #define OPERATE(OPRD1,OPRT,OPRD2,RLT)          \
   if (( OPRD1 OPRT OPRD2 )!= RLT)              \
 
 #define OPERATE(OPRD1,OPRT,OPRD2,RLT)          \
   if (( OPRD1 OPRT OPRD2 )!= RLT)              \
-    abort ();
+    FAILURE
 
 #define DECIMAL_COMPOUND_ASSIGNMENT(TYPE, OPRD)        \
 {                                              \
 
 #define DECIMAL_COMPOUND_ASSIGNMENT(TYPE, OPRD)        \
 {                                              \
@@ -54,5 +64,8 @@ main ()
   DECIMAL_COMPOUND_ASSIGNMENT(64, d64);
   DECIMAL_COMPOUND_ASSIGNMENT(128, d128);
 
   DECIMAL_COMPOUND_ASSIGNMENT(64, d64);
   DECIMAL_COMPOUND_ASSIGNMENT(128, d128);
 
+  if (failcnt != 0)
+    abort ();
+
   return 0;
 }
   return 0;
 }