mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-31 05:28:33 +00:00
67 lines
2.5 KiB
Java
67 lines
2.5 KiB
Java
/*
|
|
* Copyright (c) 2025 IBM Corporation. All rights reserved.
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
* accompanied this code).
|
|
*
|
|
* You should have received a copy of the GNU General Public License version
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
* questions.
|
|
*/
|
|
|
|
/**
|
|
* @test
|
|
* @bug 8370200
|
|
* @summary Crash: assert(outer->outcnt() >= phis + 2 - be_loads && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis
|
|
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:StressSeed=36200582 -XX:CompileCommand=quiet
|
|
* -XX:CompileCommand=compileonly,*TestMismatchedMemoryPhis*::mainTest -XX:-TieredCompilation
|
|
* -Xcomp -XX:+StressIGVN -XX:+StressLoopPeeling -XX:PerMethodTrapLimit=0 ${test.main.class}
|
|
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:CompileCommand=quiet
|
|
* -XX:CompileCommand=compileonly,*TestMismatchedMemoryPhis*::mainTest -XX:-TieredCompilation
|
|
* -Xcomp -XX:+StressIGVN -XX:+StressLoopPeeling -XX:PerMethodTrapLimit=0 ${test.main.class}
|
|
* @run main ${test.main.class}
|
|
*/
|
|
|
|
package compiler.loopstripmining;
|
|
|
|
public class TestMismatchedMemoryPhis {
|
|
long l;
|
|
volatile int iArrFld[];
|
|
|
|
void mainTest() {
|
|
int i, i1, i15 = 4, i16 = 4;
|
|
for (i = 1; i < 7; ++i) {
|
|
l = i;
|
|
}
|
|
int j = 1;
|
|
while (++j < 4) {
|
|
try {
|
|
i1 = i15 % i16;
|
|
i16 = i15;
|
|
i1 = 0 % iArrFld[j];
|
|
} catch (ArithmeticException a_e) {
|
|
}
|
|
}
|
|
}
|
|
|
|
static public void main(String[] args) {
|
|
try {
|
|
new TestMismatchedMemoryPhis().mainTest();
|
|
} catch (NullPointerException npe) {
|
|
// Expected
|
|
}
|
|
}
|
|
}
|