Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8044533

Deoptimizing negation produces wrong result for zero

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        print(1/(function() { var f = 0; return -f; })())

        Correct result is -Infinity. Under optimistic compilation with static type calculation, this produces Infinity.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                attila Attila Szegedi
                Reporter:
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: