test/compiler/6646019/Test.java

Fri, 20 Jun 2008 08:44:58 -0700

author
xdono
date
Fri, 20 Jun 2008 08:44:58 -0700
changeset 630
93435819dba2
parent 564
c0939256690b
child 688
b0fe4deeb9fb
child 720
51ae48d8072f
permissions
-rw-r--r--

Added tag jdk7-b29 for changeset 4f91c08b3e44

     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  */
    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 */
    32 public class Test  {
    33   final static int i = 2076285318;
    34   long l = 2;
    35   short s;
    37   public static void main(String[] args) {
    38     Test t = new Test();
    39     try { t.test(); }
    40     catch (Throwable e) {
    41       if (t.l != 5) {
    42         System.out.println("Fails: " + t.l + " != 5");
    43       }
    44     }
    45   }
    47   private void test() {
    48     l = 5;
    49     l = (new short[(byte)-2])[(byte)(l = i)];
    50   }
    51 }

mercurial