narrowing from float -NaN to int should produce constant 0

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.4.1
    • Component/s: hotspot
    • None
    • generic
    • solaris_8

      javac fails jacks test

      ==== 5.1.3-nan-1 narrowing from float NaN to int produces 0 FAILED
      ==== Contents of test case:

          constant_expression T513nan1 {(int) Float.NaN == 0} {(int) -Float.NaN == 0}

      ---- Result was:
      FAIL
      ---- Result should have been:
      PASS
      ==== 5.1.3-nan-1 FAILED


      ==== 5.1.3-nan-2 narrowing from double NaN to int produces 0 FAILED
      ==== Contents of test case:

          constant_expression T513nan2 {(int) Double.NaN == 0} {(int) -Double.NaN == 0}

      ---- Result was:
      FAIL
      ---- Result should have been:
      PASS
      ==== 5.1.3-nan-2 FAILED


            Assignee:
            Neal Gafter (Inactive)
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: