aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.dg/float-range-3.c12
-rw-r--r--gcc/testsuite/gcc.dg/float-range-4.c12
-rw-r--r--gcc/testsuite/gcc.dg/float-range-5.c12
4 files changed, 32 insertions, 12 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a346eb8..308826e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR testsuite/31828
+ gcc.dg/float-range-3.c (INFINITY): Define if not defined.
+ (overflow): Use INFINITY, not FP_INFINITE.
+ gcc.dg/float-range-4.c: Likewise.
+ gcc.dg/float-range-5.c: Likewise.
+
2007-10-01 Nick Clifton <nickc@redhat.com>
* gcc.c-torture/execute/20060102-1.c (f): Fix computation to work
diff --git a/gcc/testsuite/gcc.dg/float-range-3.c b/gcc/testsuite/gcc.dg/float-range-3.c
index 6a224e1..7fa766f 100644
--- a/gcc/testsuite/gcc.dg/float-range-3.c
+++ b/gcc/testsuite/gcc.dg/float-range-3.c
@@ -3,17 +3,21 @@
/* { dg-options "-std=c99" } */
#include <math.h>
+#ifndef INFINITY
+#define INFINITY (__builtin_inff ())
+#endif
+
void overflow(void)
{
float f1 = 3.5E+38f; /* { dg-warning "floating constant exceeds range" } */
float f2 = -3.5E+38f; /* { dg-warning "floating constant exceeds range" } */
- float f3 = FP_INFINITE;
- float f4 = -FP_INFINITE;
+ float f3 = INFINITY;
+ float f4 = -INFINITY;
double d1 = 1.9E+308; /* { dg-warning "floating constant exceeds range" } */
double d2 = -1.9E+308; /* { dg-warning "floating constant exceeds range" } */
- double d3 = FP_INFINITE;
- double d4 = -FP_INFINITE;
+ double d3 = INFINITY;
+ double d4 = -INFINITY;
}
void underflow(void)
diff --git a/gcc/testsuite/gcc.dg/float-range-4.c b/gcc/testsuite/gcc.dg/float-range-4.c
index 5607719..2ec38c4 100644
--- a/gcc/testsuite/gcc.dg/float-range-4.c
+++ b/gcc/testsuite/gcc.dg/float-range-4.c
@@ -3,17 +3,21 @@
/* { dg-options "-Wno-overflow -std=c99" } */
#include <math.h>
+#ifndef INFINITY
+#define INFINITY (__builtin_inff ())
+#endif
+
void overflow(void)
{
float f1 = 3.5E+38f;
float f2 = -3.5E+38f;
- float f3 = FP_INFINITE;
- float f4 = -FP_INFINITE;
+ float f3 = INFINITY;
+ float f4 = -INFINITY;
double d1 = 1.9E+308;
double d2 = -1.9E+308;
- double d3 = FP_INFINITE;
- double d4 = -FP_INFINITE;
+ double d3 = INFINITY;
+ double d4 = -INFINITY;
}
void underflow(void)
diff --git a/gcc/testsuite/gcc.dg/float-range-5.c b/gcc/testsuite/gcc.dg/float-range-5.c
index c3a2a9e..49742e3 100644
--- a/gcc/testsuite/gcc.dg/float-range-5.c
+++ b/gcc/testsuite/gcc.dg/float-range-5.c
@@ -4,17 +4,21 @@
/* { dg-options "-pedantic-errors -std=c99" } */
#include <math.h>
+#ifndef INFINITY
+#define INFINITY (__builtin_inff ())
+#endif
+
void overflow(void)
{
float f1 = 3.5E+38f; /* { dg-warning "floating constant exceeds range" } */
float f2 = -3.5E+38f; /* { dg-warning "floating constant exceeds range" } */
- float f3 = FP_INFINITE;
- float f4 = -FP_INFINITE;
+ float f3 = INFINITY;
+ float f4 = -INFINITY;
double d1 = 1.9E+308; /* { dg-warning "floating constant exceeds range" } */
double d2 = -1.9E+308; /* { dg-warning "floating constant exceeds range" } */
- double d3 = FP_INFINITE;
- double d4 = -FP_INFINITE;
+ double d3 = INFINITY;
+ double d4 = -INFINITY;
}
void underflow(void)