This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/32841] FAIL: gfortran.dg/edit_real_1.f90 on Darwin8
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2007 21:41:44 -0000
- Subject: [Bug testsuite/32841] FAIL: gfortran.dg/edit_real_1.f90 on Darwin8
- References: <bug-32841-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-07-20 21:41 -------
Try this:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int
main ()
{
double x, y;
x = 1.79769313486231570814527423731704356798070567526e+308;
printf("%52.47e\n", x);
printf("isfinite = %d\n", isfinite(x));
printf("isfinite = %d\n", isfinite(1.1 * x));
return 0;
}
compiled with: gcc -std=c99 -lm test.c
I get:
$ gcc -std=c99 -lm test.c
$ ./a.out
1.79769313486231570814527423731704356798070567526e+308
isfinite = 1
isfinite = 0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32841