1 /* 2 * Copyright (c) 2003, 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 package nsk.jvmti.GetMaxLocals; 25 26 import java.io.PrintStream; 27 28 public class maxloc001 { 29 30 static { 31 try { 32 System.loadLibrary("maxloc001"); 33 } catch (UnsatisfiedLinkError ule) { 34 System.err.println("Could not load maxloc001 library"); 35 System.err.println("java.library.path:" 36 + System.getProperty("java.library.path")); 37 throw ule; 38 } 39 } 40 check()41 native static int check(); 42 main(String[] args)43 public static void main(String[] args) { 44 args = nsk.share.jvmti.JVMTITest.commonInit(args); 45 46 System.exit(run(args, System.out) + 95/*STATUS_TEMP*/); 47 } 48 run(String argv[], PrintStream ref)49 public static int run(String argv[], PrintStream ref) { 50 return check(); 51 } 52 meth_stat(int i, String s)53 protected static final float[] meth_stat(int i, String s) { 54 float[] f = new float[i]; 55 return f; 56 } 57 meth_1(char c1)58 private char meth_1(char c1) { 59 char loc1 = c1; 60 char loc2 = loc1; 61 return loc2; 62 } 63 meth_2(float f1, float f2)64 strictfp float meth_2(float f1, float f2) { 65 float loc1; 66 double loc2; 67 loc1 = f1 / f2; 68 loc2 = loc1 / 3.33; 69 return (float)loc2 / f2; 70 } 71 72 class Inn { 73 String fld; meth_inn(String s)74 public synchronized final void meth_inn(String s) { 75 fld = s; 76 } 77 } 78 } 79 80 abstract class maxloc001a { meth_new()81 synchronized maxloc001 meth_new() { 82 maxloc001[] loc1 = new maxloc001[2]; 83 maxloc001 loc2 = new maxloc001(); 84 loc1[1] = loc2; 85 return loc1[1]; 86 } 87 meth_abs()88 abstract void meth_abs(); 89 } 90