diff options
author | Michael Meissner <meissner@cygnus.com> | 1999-07-27 15:03:03 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1999-07-27 15:03:03 +0000 |
commit | 59159a105e300b3ed5f9a67a1b76947e91f338b4 (patch) | |
tree | 978da4b2a27cbe17907c7401ade6a44e8ef3d5fe | |
parent | 94b82f2bcfcffceced323c28d9e494844b4dbc2a (diff) | |
download | gcc-59159a105e300b3ed5f9a67a1b76947e91f338b4.zip gcc-59159a105e300b3ed5f9a67a1b76947e91f338b4.tar.gz gcc-59159a105e300b3ed5f9a67a1b76947e91f338b4.tar.bz2 |
Add clones of fp-cmp-1 for float/long double; Change name of unknown register
From-SVN: r28296
-rw-r--r-- | gcc/testsuite/gcc.c-torture/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c | 41 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c | 41 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/noncompile/920507-1.c | 2 |
4 files changed, 95 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog index 71e83c6..89700ee 100644 --- a/gcc/testsuite/gcc.c-torture/ChangeLog +++ b/gcc/testsuite/gcc.c-torture/ChangeLog @@ -1,3 +1,15 @@ +1999-07-27 Michael Meissner <meissner@cygnus.com> + + * execute/ieee/fp-cmp-2.c: New file, clone from fp-cmp-1.c, + converting double to float. + + * execute/ieee/fp-cmp-3.c: New file, clone from fp-cmp-1.c, + converting double to long double. + + * noncompile/920507-1.c (x): Rename asm register from fr1 to + unknown_register, since fr1 is a legitimate register on some + machines. + 1999-06-23 Nick Clifton <nickc@cygnus.com> * compile/dll.c: New test case. Check that dll attributes diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c new file mode 100644 index 0000000..2a86d0f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c @@ -0,0 +1,41 @@ +#include <signal.h> + +float nan = 1.0f/0.0f - 1.0f/0.0f; +float x = 1.0f; + +void leave () +{ + exit (0); +} + +main () +{ +#if ! defined (__vax__) && ! defined (_CRAY) + /* Move this line earlier, for architectures (like alpha) that issue + SIGFPE on the first comparisons. */ +#ifndef SIGNAL_SUPPRESS + /* Some machines catches a SIGFPE when a NaN is compared. + Let this test succeed o such machines. */ + signal (SIGFPE, leave); +#endif + /* NaN is an IEEE unordered operand. All these test should be false. */ + if (nan == nan) + abort (); + if (nan != x) + x = 1.0; + else + abort (); + + if (nan < x) + abort (); + if (nan > x) + abort (); + if (nan <= x) + abort (); + if (nan >= x) + abort (); + if (nan == x) + abort (); +#endif + exit (0); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c new file mode 100644 index 0000000..8b18290 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c @@ -0,0 +1,41 @@ +#include <signal.h> + +long double nan = 1.0l/0.0l - 1.0l/0.0l; +long double x = 1.0l; + +void leave () +{ + exit (0); +} + +main () +{ +#if ! defined (__vax__) && ! defined (_CRAY) + /* Move this line earlier, for architectures (like alpha) that issue + SIGFPE on the first comparisons. */ +#ifndef SIGNAL_SUPPRESS + /* Some machines catches a SIGFPE when a NaN is compared. + Let this test succeed o such machines. */ + signal (SIGFPE, leave); +#endif + /* NaN is an IEEE unordered operand. All these test should be false. */ + if (nan == nan) + abort (); + if (nan != x) + x = 1.0; + else + abort (); + + if (nan < x) + abort (); + if (nan > x) + abort (); + if (nan <= x) + abort (); + if (nan >= x) + abort (); + if (nan == x) + abort (); +#endif + exit (0); +} diff --git a/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c b/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c index e1bd993..07f2fd0 100644 --- a/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c +++ b/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c @@ -1 +1 @@ -x(){register*a asm("fr1");int*v[1]={a};} +x(){register*a asm("unknown_register");int*v[1]={a};} |