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

32bit server compiler leads to wrong results on solaris-x86

    Details

    • Subcomponent:
    • Resolved In Build:
      b02
    • CPU:
      x86
    • OS:
      solaris
    • Verification:
      Verified

      Backports

        Description

        The following test case produces wrong results (var_bad) when
        running jvm with 32bit server compiler on solaris-x86.

        > JDK7b43/bin/java -server -Xcomp -XX:CompileOnly=TesterSmall_Class_0 TesterSmall
        var_bad = -602947331
        var_ok = 0

        ============ TesterSmall.java ==============
        class TesterSmall_Class_0 {
            static long var_bad = -1L;

            public TesterSmall_Class_0()
            {
              var_bad >>= 65;
              var_bad /= 65;
            }
        }

        public class TesterSmall {
            public static void main(String[] args)
            {
                TesterSmall_Class_0 t = new TesterSmall_Class_0();

                long var_ok = -1L;
                var_ok >>= 65;
                var_ok /= 65;

                System.out.println("var_bad = " + TesterSmall_Class_0.var_bad);
                System.out.println("var_ok = " + var_ok);
            }
        }

        =======================================

        The test works fine on other platforms with bot 32bit and 64bit jvms.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  twisti Christian Thalinger
                  Reporter:
                  epavlova Ekaterina Pavlova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: