Commit 695a8e62 by Janis Johnson Committed by Janis Johnson

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
parent 987ce557
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.
......
/* This test assumes IEEE float and double. */
#define __STDC_WANT_DEC_FP__
#include <float.h>
#include "convert.h"
volatile _Decimal32 sd;
......
......@@ -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;
......
......@@ -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
......
......@@ -6,7 +6,11 @@
#include "dfp-dbg.h"
#ifdef __cplusplus
#define BOOL bool
#else
#define BOOL _Bool
#endif
extern void link_error (void);
......
......@@ -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
......
......@@ -5,7 +5,11 @@
#include "dfp-dbg.h"
#ifdef __cplusplus
#define BOOL bool
#else
#define BOOL _Bool
#endif
_Decimal32 d32;
_Decimal64 d64;
......
#define EXTERN extern
int failures;
#ifdef DBG
......
......@@ -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;
......
......@@ -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
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
typedef _Decimal32 fp_t;
typedef float fp_t __attribute__((mode(SD)));
extern fp_t g(fp_t);
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
#ifdef __cplusplus
typedef float _Decimal32 __attribute__((mode(SD)));
#endif
extern void foo (_Decimal32);
_Decimal32 *p;
......
/* { dg-do compile } */
#include "dfp-dbg.h"
/* Check that the compiler generates the correct decimal float constants. */
_Decimal32 a = 100.223df;
......
......@@ -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 ()
......
......@@ -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 { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment