Add gcc.c-torture/execute/ieee/hugeval.c
From-SVN: r35184
This commit is contained in:
parent
05298deabe
commit
f0f4cb1b04
@ -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,
|
||||
|
27
gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c
Normal file
27
gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user