1 /*
   2  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
   3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   4  *
   5  *
   6  *
   7  *
   8  *
   9  *
  10  *
  11  *
  12  *
  13  *
  14  *
  15  *
  16  *
  17  *
  18  *
  19  *
  20  *
  21  *
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6646019
  27  * @summary array subscript expressions become top() with -d64
  28  * @run main/othervm -Xcomp -XX:CompileOnly=Test.test Test
  29 */
  30 
  31 
  32 public class Test  {
  33   final static int i = 2076285318;
  34   long l = 2;
  35   short s;
  36 
  37   public static void main(String[] args) {
  38     Test t = new Test();
  39     
  40     try { t.test(); }
  41     catch (Throwable e) { 
  42       if (t.l != 5) {
  43         System.out.println("Fails: " + t.l + " != 5");
  44       }
  45     }
  46     
  47   }
  48   
  49   private void test() {
  50     l = 5;
  51     l = (new short[(byte)-2])[(byte)(l = i)];
  52   }
  53 }