From f0f4cb1b04bfa88b5a7e8a32f35043a4040980c2 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Sat, 22 Jul 2000 02:46:24 +0000 Subject: [PATCH] Add gcc.c-torture/execute/ieee/hugeval.c From-SVN: r35184 --- gcc/testsuite/ChangeLog | 4 +++ .../gcc.c-torture/execute/ieee/hugeval.c | 27 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ced776a77d6..c209f0af49c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-07-21 Michael Meissner + + * gcc.c-torture/execute/ieee/hugeval.c (main): New test. + 2000-07-20 Zack Weinberg * g++.old-deja/g++.brendan/crash16.C, diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c b/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c new file mode 100644 index 00000000000..15f7088e19d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c @@ -0,0 +1,27 @@ +#include + +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); +}