[riscv-port-jdk11u:riscv-port] Integrated: 8290496: riscv: Fix build warnings-as-errors with GCC 11

Gui Cao gcao at openjdk.org
Wed Mar 6 10:36:02 UTC 2024


On Sun, 3 Mar 2024 06:40:16 GMT, Gui Cao <gcao at openjdk.org> wrote:

> Hi, Please review this backport to riscv-port-jdk17u.
> Backport of [JDK-8290496](https://bugs.openjdk.java.net/browse/JDK-8290496). Applies cleanly.
> build config:
> 
> bash configure --with-debug-level=release --with-jvm-variants=minimal --with-zlib=system --with-native-debug-symbols=internal --with-boot-jdk=/home/zifeihan/jre/jre11 --with-extra-cxxflags=-Wno-maybe-uninitialized --with-extra-cflags=-Wno-maybe-uninitialized
> 
> 
> Before this backport:
> 
> 
> ERROR: Build failed for target 'default (exploded-image)' in configuration 'linux-riscv64-normal-minimal-release' (exit code 2)
> Stopping sjavac server
> 
> === Output from failing command(s) repeated here ===
> * For target hotspot_variant-minimal_libjvm_objs_c1_LIRAssembler.o:
> In file included from /home/zifeihan/riscv-port-jdk11u/src/hotspot/share/c1/c1_LIRAssembler.hpp:28,
>                  from /home/zifeihan/riscv-port-jdk11u/src/hotspot/share/c1/c1_LIRAssembler.cpp:30:
> In member function 'void PatchingStub::install(MacroAssembler*, LIR_PatchCode, Register, CodeEmitInfo*)',
>     inlined from 'void LIR_Assembler::patching_epilog(PatchingStub*, LIR_PatchCode, Register, CodeEmitInfo*)' at /home/zifeihan/riscv-port-jdk11u/src/hotspot/share/c1/c1_LIRAssembler.cpp:45:17:
> /home/zifeihan/riscv-port-jdk11u/src/hotspot/share/c1/c1_CodeStubs.hpp:423:25: error: 'this' pointer is null [-Werror=nonnull]
>   423 |       n_move->set_offset(field_offset);
>       |       ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
> In file included from /home/zifeihan/riscv-port-jdk11u/src/hotspot/share/code/nativeInst.hpp:30,
>                  from /home/zifeihan/riscv-port-jdk11u/src/hotspot/share/precompiled/precompiled.hpp:77:
> /home/zifeihan/riscv-port-jdk11u/src/hotspot/cpu/riscv/nativeInst_riscv.hpp: In member function 'void LIR_Assembler::patching_epilog(PatchingStub*, LIR_PatchCode, Register, CodeEmitInfo*)':
> /home/zifeihan/riscv-port-jdk11u/src/hotspot/cpu/riscv/nativeInst_riscv.hpp:419:8: note: in a call to non-static member function 'void NativeMovRegMem::set_offset(int)'
>   419 |   void set_offset(int x);
>       |        ^~~~~~~~~~
> cc1plus: all warnings being treated as errors
> 
> * All command lines available in /home/zifeihan/riscv-port-jdk11u/build/linux-riscv64-normal-minimal-release/make-support/failure-logs.
> === End of repeated output ===
> 
> No indication of failed target found.
> Hint: Try searching the build log for '] Error'.
> Hint: See doc/building.html#troubleshooting for assistance.
> 
> make[1]: *** [/home/zifeihan/riscv-port-jdk11u/make/Init.gmk:308: main] E...

This pull request has now been integrated.

Changeset: c7fb5135
Author:    Gui Cao <gcao at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.org/riscv-port-jdk11u/commit/c7fb5135e2b43b20eb962d7a24fbc04301c6aeab
Stats:     43 lines in 2 files changed: 6 ins; 14 del; 23 mod

8290496: riscv: Fix build warnings-as-errors with GCC 11

Reviewed-by: fyang
Backport-of: 5425573bb4de1a2434201bc7ec3700b527ce346b

-------------

PR: https://git.openjdk.org/riscv-port-jdk11u/pull/7


More information about the riscv-port-dev mailing list