1 /* 2 * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * 27 * @summary converted from VM Testbase jit/t/t080. 28 * VM Testbase keywords: [jit, quick] 29 * 30 * @library /vmTestbase 31 * /test/lib 32 * @run driver jdk.test.lib.FileInstaller . . 33 * @build jit.t.t080.t080 34 * @run driver ExecDriver --java jit.t.t080.t080 35 */ 36 37 package jit.t.t080; 38 39 import nsk.share.TestFailure; 40 import nsk.share.GoldChecker; 41 42 // Like t079.java except this one has lots of local variables. 43 44 class t080 45 { 46 public static final GoldChecker goldChecker = new GoldChecker( "t080" ); 47 48 public static void main(String[] argv) 49 { 50 double d[] = new double[2]; 51 double e[] = null; 52 double x = 39.0, y = 42.0; 53 double z; 54 int i = 0, j = 1; 55 int r; 56 57 // The following is just bulk. It's designed to get the offset 58 // of the (used) locals outside the reach of a signed byte. 59 int i00; i00 = 0; 60 int i01; i01 = 1; 61 int i02; i02 = 2; 62 int i03; i03 = 3; 63 int i04; i04 = 4; 64 int i05; i05 = 5; 65 int i06; i06 = 6; 66 int i07; i07 = 7; 67 int i08; i08 = 8; 68 int i09; i09 = 9; 69 70 int i10; i10 = 0; 71 int i11; i11 = 1; 72 int i12; i12 = 2; 73 int i13; i13 = 3; 74 int i14; i14 = 4; 75 int i15; i15 = 5; 76 int i16; i16 = 6; 77 int i17; i17 = 7; 78 int i18; i18 = 8; 79 int i19; i19 = 9; 80 81 int i20; i20 = 0; 82 int i21; i21 = 1; 83 int i22; i22 = 2; 84 int i23; i23 = 3; 85 int i24; i24 = 4; 86 int i25; i25 = 5; 87 int i26; i26 = 6; 88 int i27; i27 = 7; 89 int i28; i28 = 8; 90 int i29; i29 = 9; 91 92 int i30; i30 = 0; 93 int i31; i31 = 1; 94 int i32; i32 = 2; 95 int i33; i33 = 3; 96 int i34; i34 = 4; 97 int i35; i35 = 5; 98 int i36; i36 = 6; 99 int i37; i37 = 7; 100 int i38; i38 = 8; 101 int i39; i39 = 9; 102 103 (e = d)[r = i + j] = (z = x + y); 104 t080.goldChecker.println(e[1]); 105 t080.goldChecker.check(); 106 } 107 }