This warning seems to be a false positive, because 1) array "fq" with elements from index 0 to "jz" has already been initialized as "fw" at line 290 [1], and 2) variable "jz" should be non-negative from the comment at line 99 [2].
Note-1: GCC warning option -Wmaybe-uninitialized is not a new one. Note-2: x86-64 build with GCC 12 on Ubuntu 22.04 passed in my local test. This warning is raised only on GCC 12 + AArch64. I suspect it might be some GCC 12 bug, so I reported it to GCC community [3]. Since it involves third party code, I think it's better to suppress the warning by simply disabling this warning option in the makefile. Testing: Release builds with GCC 9, GCC 11 and GCC 12 passed on Ubuntu 22.04/AArch64 system. [1] https://github.com/openjdk/jdk/blob/master/src/java.base/share/native/libfdlibm/k_rem_pio2.c#L290 [2] https://github.com/openjdk/jdk/blob/master/src/java.base/share/native/libfdlibm/k_rem_pio2.c#L99 [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106992 ------------- Commit messages: - 8293887: AArch64 build failure with GCC 12 due to maybe-uninitialized warning in libfdlibm k_rem_pio2.c Changes: https://git.openjdk.org/jdk/pull/10386/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10386&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293887 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/10386.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10386/head:pull/10386 PR: https://git.openjdk.org/jdk/pull/10386