This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite] fix two dfp tests


I checked in the following on mainline; one decimal float test should
have been run, but had a leftover "dg-do compile" from when it was
first written and runtime support didn't exist yet.  The second fails
on systems where long double is different from double because support
for conversions to bigger binary float types doesn't yet exist.

2006-11-29  Janis Johnson  <janis187@us.ibm.com>

	* gcc.dg/dfp/convert-int.c: Remove dg-do compile, fix comment.

	* gcc.dg/dfp/convert-bfp.c: Skip long double conversions.

Index: gcc/testsuite/gcc.dg/dfp/convert-int.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-int.c	(revision 119257)
+++ gcc/testsuite/gcc.dg/dfp/convert-int.c	(working copy)
@@ -1,7 +1,6 @@
-/* { dg-do compile } */
 /* { dg-options "-std=gnu99 -O0" } */
 
-/* N1150 5.1 Conversion between decimal floating integer.
+/* N1150 5.1 Conversion between decimal floating types and integer.
    C99 6.3.1.4(1a) New.  */
 
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/dfp/convert-bfp.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/convert-bfp.c	(revision 119257)
+++ gcc/testsuite/gcc.dg/dfp/convert-bfp.c	(working copy)
@@ -4,12 +4,17 @@
    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.  */
+#define SKIP_LONG_DOUBLE
+
 volatile _Decimal32 d32;
 volatile _Decimal64 d64;
 volatile _Decimal128 d128;
 volatile float sf;
 volatile double df;
+#ifndef SKIP_LONG_DOUBLE
 volatile long double tf;
+#endif
 
 extern void abort (void);
 
@@ -28,9 +33,11 @@
   if (df != 2.0)
     abort ();
 
+#ifndef SKIP_LONG_DOUBLE
   tf = d32;
   if (tf != 2.0l)
     abort ();
+#endif
 
   /* Conversions from _Decimal64. */
   d64 = -7.0dd;
@@ -42,9 +49,11 @@
   if (df != -7.0)
     abort ();
 
+#ifndef SKIP_LONG_DOUBLE
   tf = d64;
   if (tf != -7.0l)
     abort ();
+#endif
 
   /* Conversions from _Decimal128. */
   d128 = 30.0dl;
@@ -88,6 +97,7 @@
   if (d128 != 30.0dl)
     abort ();
 
+#ifndef SKIP_LONG_DOUBLE
   tf = -22.0l;
   d32 = tf;
   if (d32 != -22.0df)
@@ -100,6 +110,7 @@
   d128 = tf;
   if (d128 != -22.0dl)
     abort ();
+#endif
 
   /* 2**(-11) = 0.00048828125. */
   d128 = 0.000488281251dl;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]