ADDITIONAL SYSTEM INFORMATION :
```bash
$ ./release-jdk/jdk-17.0.10/bin/java -version
java version "17.0.10" 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 17.0.10+11-LTS-240)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.10+11-LTS-240, mixed mode, sharing)
$ ./jdk17u-dev/build/linux-x86_64-server-fastdebug/jdk/bin/java -version
openjdk version "17.0.11-internal" 2024-04-16
OpenJDK Runtime Environment (fastdebug build 17.0.11-internal+0-adhoc.user.jdk17u-dev)
OpenJDK 64-Bit Server VM (fastdebug build 17.0.11-internal+0-adhoc.user.jdk17u-dev, mixed mode)
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
```
A DESCRIPTION OF THE PROBLEM :
When I use JDK 17.0.10 and JDK compiled from the jdk17u-dev repository to run the testcase, the testcase outputs incorrect results.
There's a rather strange situation in the testcase: the array b is not used at all, but when I delete the definition of array b, the mis-compilation phenomenon disappears.
REGRESSION : Last worked in version 11.0.22
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java Test
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
160
320
480
640
800
960
1120
1280
1440
1600
ACTUAL -
160
320
480
625
770
915
1060
1205
1350
1495
---------- BEGIN SOURCE ----------
class Test {
int a = 400;
int[] b = new int[a];
long c;
void k() {
int[] e = new int[a];
for (int f = 0; f < 20000; ++f)
for (int g = 0; g < 20000; g++)
;
int d;
d = 1;
while (++d < 34) {
e[d] = 5;
synchronized (new Test()) {
}
}
for (int g = 0; g < e.length; g++)
c += e[g];
System.out.println(c);
}
public static void main(String[] m) {
Test o = new Test();
for (int g = 0; g < 10; g++)
o.k();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Using -Xint.
FREQUENCY : always