aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2009-09-17 21:41:38 +0000
committerJanis Johnson <janis@gcc.gnu.org>2009-09-17 21:41:38 +0000
commit695a8e6210f36efd711a23ab4b2bd4f1cbf8a857 (patch)
tree7bf3cb33d1c3c452c517924fe419f535d8110857 /gcc
parent987ce5575c1265d77ea60d38cd9309d9c1f9715f (diff)
downloadgcc-695a8e6210f36efd711a23ab4b2bd4f1cbf8a857.zip
gcc-695a8e6210f36efd711a23ab4b2bd4f1cbf8a857.tar.gz
gcc-695a8e6210f36efd711a23ab4b2bd4f1cbf8a857.tar.bz2
dfp-dbg.h: Define EXTERN.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog18
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c3
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-int-fold.c4
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-int.c4
-rw-r--r--gcc/testsuite/gcc.dg/dfp/dfp-dbg.h2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr31385.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr35620.c4
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr39986.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/signbit-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c2
15 files changed, 52 insertions, 11 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e4b5853..67cf3a9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c b/gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c
index 743eb29..3fef98a 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-bfp-10.c
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c b/gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c
index 41a04fe..d62a7e4 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c b/gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c
index 349fb35..67c9d71 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c
@@ -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
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-int-fold.c b/gcc/testsuite/gcc.dg/dfp/convert-int-fold.c
index ae0945b..038559d 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-int-fold.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-int-fold.c
@@ -6,7 +6,11 @@
#include "dfp-dbg.h"
+#ifdef __cplusplus
+#define BOOL bool
+#else
#define BOOL _Bool
+#endif
extern void link_error (void);
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c b/gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c
index 9abbbbb..3f6faae 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-int-max-fold.c
@@ -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
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-int.c b/gcc/testsuite/gcc.dg/dfp/convert-int.c
index 0c2d793..1525d57 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-int.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-int.c
@@ -5,7 +5,11 @@
#include "dfp-dbg.h"
+#ifdef __cplusplus
+#define BOOL bool
+#else
#define BOOL _Bool
+#endif
_Decimal32 d32;
_Decimal64 d64;
diff --git a/gcc/testsuite/gcc.dg/dfp/dfp-dbg.h b/gcc/testsuite/gcc.dg/dfp/dfp-dbg.h
index a32afa9..253a9d0 100644
--- a/gcc/testsuite/gcc.dg/dfp/dfp-dbg.h
+++ b/gcc/testsuite/gcc.dg/dfp/dfp-dbg.h
@@ -1,3 +1,5 @@
+#define EXTERN extern
+
int failures;
#ifdef DBG
diff --git a/gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h b/gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h
index 8dbb509..5ba0ab0 100644
--- a/gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h
+++ b/gcc/testsuite/gcc.dg/dfp/func-vararg-alternate.h
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c b/gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c
index 6510589..c4aa4cb 100644
--- a/gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c
+++ b/gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c
@@ -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
diff --git a/gcc/testsuite/gcc.dg/dfp/pr31385.c b/gcc/testsuite/gcc.dg/dfp/pr31385.c
index 72f5f935..fc024a3 100644
--- a/gcc/testsuite/gcc.dg/dfp/pr31385.c
+++ b/gcc/testsuite/gcc.dg/dfp/pr31385.c
@@ -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);
diff --git a/gcc/testsuite/gcc.dg/dfp/pr35620.c b/gcc/testsuite/gcc.dg/dfp/pr35620.c
index 08137cf..37a9c40 100644
--- a/gcc/testsuite/gcc.dg/dfp/pr35620.c
+++ b/gcc/testsuite/gcc.dg/dfp/pr35620.c
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/dfp/pr39986.c b/gcc/testsuite/gcc.dg/dfp/pr39986.c
index 04ff2b6..e7c9ce9 100644
--- a/gcc/testsuite/gcc.dg/dfp/pr39986.c
+++ b/gcc/testsuite/gcc.dg/dfp/pr39986.c
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/dfp/signbit-2.c b/gcc/testsuite/gcc.dg/dfp/signbit-2.c
index e7d3f04..e51bf91 100644
--- a/gcc/testsuite/gcc.dg/dfp/signbit-2.c
+++ b/gcc/testsuite/gcc.dg/dfp/signbit-2.c
@@ -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 ()
diff --git a/gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c b/gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c
index 0d39a24..2d72bba 100644
--- a/gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c
+++ b/gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c
@@ -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 { \