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

get different results with jit for division of integers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: vm-legacy
    • Subcomponent:
      jit
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      without jit it generates the desired output.
      Test passes on sparc but fails on win-NT.

      [5/20 sadhana]

      public class t {

        public static void main(String argv[] ) {
              int x =8;
      public class t {

        public static void main(String argv[] ) {
              int x =8;
              if ((x / 2) == 4)
                System.out.println("Passed(1)");
              else
                System.out.println("Failed(1)");

              x = 21;
              x /= 2;
              if (x == 10)
                System.out.println("Passed(2)");
              else
                System.out.println("Failed(2)");
        }
      }

        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: