Add gcc.c-torture/execute/ieee/hugeval.c

From-SVN: r35184
This commit is contained in:
Michael Meissner 2000-07-22 02:46:24 +00:00 committed by Michael Meissner
parent 05298deabe
commit f0f4cb1b04
2 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2000-07-21 Michael Meissner <meissner@redhat.com>
* gcc.c-torture/execute/ieee/hugeval.c (main): New test.
2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
* g++.old-deja/g++.brendan/crash16.C,

View File

@ -0,0 +1,27 @@
#include <math.h>
static const double zero = 0.0;
static const double pone = 1.0;
static const double none = -1.0;
static const double pinf = 1.0 / 0.0;
static const double ninf = -1.0 / 0.0;
int
main ()
{
if (pinf != pone/zero)
abort ();
if (ninf != none/zero)
abort ();
#ifdef HUGE_VAL
if (HUGE_VAL != pinf)
abort ();
if (-HUGE_VAL != ninf)
abort ();
#endif
exit (0);
}