]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR testsuite/31828 (FAIL: gcc.dg/float-range-[3-5].c (test for excess errors))
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Tue, 2 Oct 2007 02:17:50 +0000 (02:17 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 2 Oct 2007 02:17:50 +0000 (02:17 +0000)
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.

From-SVN: r128947

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/float-range-3.c
gcc/testsuite/gcc.dg/float-range-4.c
gcc/testsuite/gcc.dg/float-range-5.c

index a346eb8b98bc9be2b520af59fb10dcbd34532e25..308826e51abe9bbc29467f349d4545411252e505 100644 (file)
@@ -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
index 6a224e16de915de220ca4650a5624935f82bddde..7fa766f526e36261f35c5f6ea82347db0c0bbc52 100644 (file)
@@ -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)
index 5607719ac995be7ad96da1903b9d005f3d985629..2ec38c43bf669b33a0f8626ec637b0181b1d5ce5 100644 (file)
@@ -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)
index c3a2a9ee271cd0e4044ab0a4381361fa1442921c..49742e322bfdd84605a09762d3401afe55c8d153 100644 (file)
@@ -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)