dfp-dbg.h: Define EXTERN.
authorJanis Johnson <janis187@us.ibm.com>
Thu, 17 Sep 2009 21:41:38 +0000 (21:41 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Thu, 17 Sep 2009 21:41:38 +0000 (21:41 +0000)
* gcc/testsuite/gcc.dg/dfp/dfp-dbg.h: Define EXTERN.
* gcc/testsuite/gcc.dg/dfp/signbit-2.c: Use it.
* gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h: Change two
arguments to unsigned int.
* gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c: Don't include float.h.
* gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c: Include dfp-dbg.h.
* gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c: Ditto
* gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c: Ditto.
* gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c: Ditto.
* gcc/testsuite/gcc.dg/dfp/pr39986.c: Ditto.
* gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c: Ditto.
* gcc/testsuite/gcc.dg/dfp/pr31385.c: Use mode in typedef, not C type.
* gcc/testsuite/gcc.dg/dfp/pr35620.c: Define typedef for C++.
* gcc/testsuite/gcc.dg/dfp/convert-int.c: Define BOOL for C++.
* gcc/testsuite/gcc.dg/dfp/convert-int-fold.c: Ditto.

From-SVN: r151821

15 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c
gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c
gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c
gcc/testsuite/gcc.dg/dfp/convert-int-fold.c
gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c
gcc/testsuite/gcc.dg/dfp/convert-int.c
gcc/testsuite/gcc.dg/dfp/dfp-dbg.h
gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h
gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c
gcc/testsuite/gcc.dg/dfp/pr31385.c
gcc/testsuite/gcc.dg/dfp/pr35620.c
gcc/testsuite/gcc.dg/dfp/pr39986.c
gcc/testsuite/gcc.dg/dfp/signbit-2.c
gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c

index e4b58538e322f8ebec11a78ada6e1f1e93296f18..67cf3a969d8a5852dc01c1b7f33b3ed946db831c 100644 (file)
@@ -1,3 +1,21 @@
+2009-09-17  Janis Johnson  <janis187@us.ibm.com>
+
+       * gcc/testsuite/gcc.dg/dfp/dfp-dbg.h: Define EXTERN.
+       * gcc/testsuite/gcc.dg/dfp/signbit-2.c: Use it.
+       * gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h: Change two
+       arguments to unsigned int.
+       * gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c: Don't include float.h.
+       * gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c: Include dfp-dbg.h.
+       * gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c: Ditto
+       * gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c: Ditto.
+       * gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c: Ditto.
+       * gcc/testsuite/gcc.dg/dfp/pr39986.c: Ditto.
+       * gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c: Ditto.
+       * gcc/testsuite/gcc.dg/dfp/pr31385.c: Use mode in typedef, not C type.
+       * gcc/testsuite/gcc.dg/dfp/pr35620.c: Define typedef for C++.
+       * gcc/testsuite/gcc.dg/dfp/convert-int.c: Define BOOL for C++.
+       * gcc/testsuite/gcc.dg/dfp/convert-int-fold.c: Ditto.
+
 2009-09-17  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.dg/debug/dwarf2/struct-loc1.c: New test.
index 743eb293c55c93397592ab44c14efef23ef069a8..3fef98a3384192a0d4eccb596d0047a681853428 100644 (file)
@@ -1,8 +1,5 @@
 /* This test assumes IEEE float and double.  */
 
-#define __STDC_WANT_DEC_FP__
-#include <float.h>
-
 #include "convert.h"
 
 volatile _Decimal32 sd;
index 41a04febf6188808373d1fb0f869e0f12989ce57..d62a7e4b21c437d58fcb09dc1d655da43db1d28c 100644 (file)
@@ -4,6 +4,8 @@
    decimal floating types and generic floating types.
    C99 6.3.1.5(4) Conversions, arithmetic operands, real floating types.  */
 
+#include "dfp-dbg.h"
+
 _Decimal32 d32;
 _Decimal64 d64;
 _Decimal128 d128;
index 349fb3545ecf8ce7b0daabe99b621a455c4c2b1e..67c9d71c224ae78af797245d14cd76e174d5d0fb 100644 (file)
@@ -4,6 +4,8 @@
    decimal floating types and generic floating types.
    C99 6.3.1.5(3) New.  */
 
+#include "dfp-dbg.h"
+
 extern void link_error ();
 
 int
index ae0945b0d5d4acf0a5f4f2f1bba677d856064caf..038559d41e45b8fbaddf5562824eb0b218d0c114 100644 (file)
@@ -6,7 +6,11 @@
 
 #include "dfp-dbg.h"
 
+#ifdef __cplusplus
+#define BOOL bool
+#else
 #define BOOL _Bool
+#endif
 
 extern void link_error (void);
 
index 9abbbbb6078e54e93d402783dbae7a9b96023b47..3f6faae34cc42ff57834ed1fcf0eef4f292e030d 100644 (file)
@@ -7,6 +7,8 @@
    64-bit long long (there's a check for that below).  This version tests
    conversions during compilation.  */
 
+#include "dfp-dbg.h"
+
 extern void link_error (void);
 
 void
index 0c2d79386041b49b6d8151ae4e77eb26bca4ab2a..1525d5760a44d10bf181eb4da838ffccc045a2c0 100644 (file)
@@ -5,7 +5,11 @@
 
 #include "dfp-dbg.h"
 
+#ifdef __cplusplus
+#define BOOL bool
+#else
 #define BOOL _Bool
+#endif
 
 _Decimal32 d32;
 _Decimal64 d64;
index a32afa96bae5c1cedad8c7e8e0ceeb4a2a736b8e..253a9d05f57f7a238b34a92dded90a39f2661c9a 100644 (file)
@@ -1,3 +1,5 @@
+#define EXTERN extern
+
 int failures;
 
 #ifdef DBG
index 8dbb5093fe2565c648b08f1660dd6c3139798aff..5ba0ab0dc1f70bf172d2bf81daeb2a6c45709bfd 100644 (file)
@@ -13,7 +13,7 @@ union U {
 };
 
 void
-compare (double r, double s, int *p, int *q, int n, int line)
+compare (double r, double s, unsigned int *p, unsigned int *q, int n, int line)
 {
   int i;
 
index 65105899fb4f78e09d2b83949eab4ce8967f7335..c4aa4cbb27edede313151f49591473e12108aac7 100644 (file)
@@ -3,6 +3,8 @@
 /* C99 6.5.5: Multiplicative operators.
    C99 6.5.6: Additive operators.  */
 
+#include "dfp-dbg.h"
+
 extern void link_error (void);
 
 int
index 72f5f935f09557f6dd12c1ac1c21749f1cd5dfb5..fc024a3e6b829eb319ed287b85c3d79a978cc722 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
 
-typedef _Decimal32 fp_t;
+typedef float fp_t __attribute__((mode(SD)));
 
 extern fp_t g(fp_t);
 
index 08137cfb6d96d169240f1faaefa417e0a30a939a..37a9c4044ed54e33d7d05dac5d098466a0a4a551 100644 (file)
@@ -1,6 +1,10 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
 
+#ifdef __cplusplus
+typedef float _Decimal32 __attribute__((mode(SD)));
+#endif
+
 extern void foo (_Decimal32);
 _Decimal32 *p;
 
index 04ff2b623e03442b8eb7f3c1a79c851164de0d07..e7c9ce98283e368522c4e0552d436cbd0673652b 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 
+#include "dfp-dbg.h"
+
 /* Check that the compiler generates the correct decimal float constants.  */
 
 _Decimal32 a = 100.223df;
index e7d3f0405e734eb7c0ad0d22bb95ebac3d8605a1..e51bf918bf474c833a708848a38294336f7e2ff7 100644 (file)
@@ -12,12 +12,12 @@ volatile float f = 1.2f;
 volatile double d = -7.8;
 volatile long double ld = 3.4L;
 
-extern int signbitf (float);
-extern int signbit (double);
-extern int signbitl (long double);
-extern int signbitd32 (_Decimal32);
-extern int signbitd64 (_Decimal64);
-extern int signbitd128 (_Decimal128);
+EXTERN int signbitf (float);
+EXTERN int signbit (double);
+EXTERN int signbitl (long double);
+EXTERN int signbitd32 (_Decimal32);
+EXTERN int signbitd64 (_Decimal64);
+EXTERN int signbitd128 (_Decimal128);
 
 int
 main ()
index 0d39a24bb65f9ee244d5d4d9d7c8bfabadfe9815..2d72bba423581976422b897f850473f4104a8b1e 100644 (file)
@@ -2,6 +2,8 @@
 
 /* Test various conversions involving decimal floating types. */
 
+#include "dfp-dbg.h"
+
 /* Assertion that constant C is of type T.  */
 #define ASSERT_CONST_TYPE(C, T)                 \
         do {                                    \