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

get different results with jit when printing float value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 1.0
    • vm-legacy
    • jit
    • x86
    • windows_nt

      without jit it generates the desired output.

      [5/17 sadhana]


      $ more bug203_beta.java
      class bug203_beta {
          public static void main( String x[] ){
              float f = 2.2f;
              int i;
              i = (byte) f + 1;
              System.out.print("(byte) "+f+" + 1 yields "+i+"\\n");
          }
      }

      $ more *tlog
      ##### bug203_beta java_run.sh
       hydra_javac.sh
      f:/jdk1.0.2_jit/build/win32/bin/javac_g bug203_beta.java > bug2
      03_beta.javac.out 2>&1
      f:/jdk1.0.2_jit/build/win32/bin/jitc_g -xarch=x86 bug203_beta.cla
      ss > bug203_beta.jitc.out 2 >& 1
      hydra_resolve
      f:/jdk1.0.2_jit/build/win32/bin/java_g -Djava.compiler=JIT bug20
      3_beta >> bug203_beta.java.out 2>&1
      (byte) -1.#IND + 1 yields 3

      ::::::::::::::
      bug203_beta.java.pass
      ::::::::::::::
      (byte) 2.2 + 1 yields 3

            duke J. Duke
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: