1 /* 2 * Copyright (c) 2018, Red Hat, Inc. 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 * @bug 8202950 27 * @summary C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint 28 * 29 * @run main/othervm -Xcomp -Xbatch -XX:CompileOnly=UnexpectedPinnedNodeInOuterLoop -XX:-TieredCompilation UnexpectedPinnedNodeInOuterLoop 30 * 31 */ 32 33 public class UnexpectedPinnedNodeInOuterLoop { 34 35 public static final int N = 400; 36 37 public static volatile float fFld=0.488F; 38 public static volatile int iFld=143; 39 lMeth(int i2)40 public static void lMeth(int i2) { 41 int i20=95, i21=-163, i22=-11, iArr[]=new int[N], iArr2[]=new int[N]; 42 byte by1=-97; 43 44 for (i20 = 15; 253 > i20; ++i20) { 45 iFld += i21; 46 for (i22 = 1; 7 > i22; i22++) { 47 iArr[i20 + 1] >>= i20; 48 } 49 fFld = i2; 50 iArr2[i20] -= (int)2.302F; 51 } 52 } 53 main(String[] strArr)54 public static void main(String[] strArr) { 55 lMeth(0); 56 } 57 } 58