This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] fix <decfloat.h>; not a regression but obvious
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Sep 2006 11:13:19 -0700
- Subject: [PATCH] fix <decfloat.h>; not a regression but obvious
The DFP test that checks macros defined in <decfloat.h> was set up to
be compile-only, so it didn't detect that three of the macros were
defined incorrectly. There's also a typo in the test that caused another
failure when it was fixed to be an executable test.
This doesn't fix a regression, but the fix is to a new header file
that's only used by people who explicitly include it. Given that,
and the face that the fix is obvious, is this OK for mainline?
Tested on powerpc64-linux.
2006-09-20 Janis Johnson <janis187@us.ibm.com>
* ginclude/decfloat.h (DEC*_DEN): Define using the correct builtins.
testsuite:
* gcc.dg/dfp/decfloat-constants.c: Remove 'dg-do compile', fix typo.
Index: gcc/ginclude/decfloat.h
===================================================================
--- gcc/ginclude/decfloat.h (revision 117086)
+++ gcc/ginclude/decfloat.h (working copy)
@@ -86,9 +86,9 @@
#undef DEC32_DEN
#undef DEC64_DEN
#undef DEC128_DEN
-#define DEC32_DEN __DEC32_MIN__
-#define DEC64_DEN __DEC64_MIN__
-#define DEC128_DEN __DEC128_MIN__
+#define DEC32_DEN __DEC32_DEN__
+#define DEC64_DEN __DEC64_DEN__
+#define DEC128_DEN __DEC128_DEN__
/* The floating-point expression evaluation method.
-1 indeterminate
Index: gcc/testsuite/gcc.dg/dfp/decfloat-constants.c
===================================================================
--- gcc/testsuite/gcc.dg/dfp/decfloat-constants.c (revision 117086)
+++ gcc/testsuite/gcc.dg/dfp/decfloat-constants.c (working copy)
@@ -1,4 +1,3 @@
-/* { dg-do compile } */
/* { dg-options "-std=gnu99" } */
/* N1150 4: Characteristics of decimal floating types <decfloat.h>.
@@ -35,7 +34,7 @@
if (DEC128_EPSILON != 1E-33DL) abort();
if (DEC32_MIN != 1E-95DF) abort();
- if (DEC32_MIN != 1E-383DD) abort();
+ if (DEC64_MIN != 1E-383DD) abort();
if (DEC128_MIN != 1E-6143DL) abort();
if (DEC32_DEN != 0.000001E-95DF) abort();