OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / libjava / testsuite / libjava.lang / CompareNaN.java
1 /*
2  * JLS 4.2.3 specifies that (x op y) must be false if either x or y
3  * is NaN and op is one of <, >, <=, >=, or ==.
4  *
5  * Some targets may need specific options wired into libgcj.spec
6  * to pass this test.  For example, alpha-linux requires -mieee
7  * to prevent an unrecoverable fp trap.
8  */
9
10 public class CompareNaN {
11   public static void main(String[] args) {
12     double x = Double.NaN;
13     System.out.println(x == x);
14   }
15 }