Tue, 10 Sep 2019 19:58:22 +0200
8230813: Add JDK-8010500 to compiler/loopopts/superword/TestFuzzPreLoop.java bug list
Reviewed-by: zgu
shade@9769 | 1 | /* |
shade@9769 | 2 | * Copyright (c) 2019, Red Hat, Inc. All rights reserved. |
shade@9769 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
shade@9769 | 4 | * |
shade@9769 | 5 | * This code is free software; you can redistribute it and/or modify it |
shade@9769 | 6 | * under the terms of the GNU General Public License version 2 only, as |
shade@9769 | 7 | * published by the Free Software Foundation. |
shade@9769 | 8 | * |
shade@9769 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
shade@9769 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
shade@9769 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
shade@9769 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
shade@9769 | 13 | * accompanied this code). |
shade@9769 | 14 | * |
shade@9769 | 15 | * You should have received a copy of the GNU General Public License version |
shade@9769 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
shade@9769 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
shade@9769 | 18 | * |
shade@9769 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
shade@9769 | 20 | * or visit www.oracle.com if you need additional information or have any |
shade@9769 | 21 | * questions. |
shade@9769 | 22 | */ |
shade@9769 | 23 | |
shade@9769 | 24 | /* |
shade@9769 | 25 | * @test |
shade@9770 | 26 | * @bug 8134739 8010500 |
shade@9769 | 27 | * @summary SEGV in SuperWord::get_pre_loop_end |
shade@9769 | 28 | * @run main/othervm compiler.loopopts.superword.TestFuzzPreLoop |
shade@9769 | 29 | */ |
shade@9769 | 30 | |
shade@9769 | 31 | package compiler.loopopts.superword; |
shade@9769 | 32 | |
shade@9769 | 33 | public class TestFuzzPreLoop { |
shade@9769 | 34 | static Object sink; |
shade@9769 | 35 | short sFld = -19206; |
shade@9769 | 36 | |
shade@9769 | 37 | void doTest() { |
shade@9769 | 38 | int[] arr = new int[400]; |
shade@9769 | 39 | |
shade@9769 | 40 | for (int i1 = 0; i1 < 200; i1++) { |
shade@9769 | 41 | for (int i2 = 0; i2 < 100; i2++) { |
shade@9769 | 42 | sink = new int[400]; |
shade@9769 | 43 | } |
shade@9769 | 44 | arr[i1] = 0; |
shade@9769 | 45 | } |
shade@9769 | 46 | |
shade@9769 | 47 | float f1 = 0; |
shade@9769 | 48 | for (int i3 = 0; i3 < 200; i3++) { |
shade@9769 | 49 | f1 += i3 * i3; |
shade@9769 | 50 | } |
shade@9769 | 51 | for (int i4 = 0; i4 < 200; i4++) { |
shade@9769 | 52 | f1 += i4 - sFld; |
shade@9769 | 53 | } |
shade@9769 | 54 | |
shade@9769 | 55 | System.out.println(arr); |
shade@9769 | 56 | System.out.println(f1); |
shade@9769 | 57 | } |
shade@9769 | 58 | |
shade@9769 | 59 | public static void main(String... args) throws Exception { |
shade@9769 | 60 | TestFuzzPreLoop test = new TestFuzzPreLoop(); |
shade@9769 | 61 | for (int i = 0; i < 100; i++) { |
shade@9769 | 62 | test.doTest(); |
shade@9769 | 63 | } |
shade@9769 | 64 | } |
shade@9769 | 65 | } |