summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorjsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-17 16:07:49 +0000
committerjsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-17 16:07:49 +0000
commit952b5fe2da03d8c611650b8ae6bbf61e84615602 (patch)
tree870e389fc235ec8a732eded5f0c076df4eddbf2c /libjava
parenta2ce68dcdfd563384b49107c738c5ab4f68deaba (diff)
downloadgcc-952b5fe2da03d8c611650b8ae6bbf61e84615602.tar.gz
* libjava.lang/CompareNaN.java: New test.
* libjava.lang/CompareNaN.out: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63003 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/testsuite/ChangeLog5
-rw-r--r--libjava/testsuite/libjava.lang/CompareNaN.java15
-rw-r--r--libjava/testsuite/libjava.lang/CompareNaN.out1
3 files changed, 21 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index e13a434141e..caf3a836a6d 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-16 Jeff Sturm <jsturm@one-point.com>
+
+ * libjava.lang/CompareNaN.java: New test.
+ * libjava.lang/CompareNaN.out: New test.
+
2003-02-16 Mark Wielaard <mark@klomp.org>
* libjava.mauve/xfails: Add Class.reflect2 and String.getBytes FAILs.
diff --git a/libjava/testsuite/libjava.lang/CompareNaN.java b/libjava/testsuite/libjava.lang/CompareNaN.java
new file mode 100644
index 00000000000..77a6d6aa807
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/CompareNaN.java
@@ -0,0 +1,15 @@
+/*
+ * JLS 4.2.3 specifies that (x op y) must be false if either x or y
+ * is NaN and op is one of <, >, <=, >=, or ==.
+ *
+ * Some targets may need specific options wired into libgcj.spec
+ * to pass this test. For example, alpha-linux requires -mieee
+ * to prevent an unrecoverable fp trap.
+ */
+
+public class CompareNaN {
+ public static void main(String[] args) {
+ double x = Double.NaN;
+ System.out.println(x == x);
+ }
+}
diff --git a/libjava/testsuite/libjava.lang/CompareNaN.out b/libjava/testsuite/libjava.lang/CompareNaN.out
new file mode 100644
index 00000000000..c508d5366f7
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/CompareNaN.out
@@ -0,0 +1 @@
+false