-
Bug
-
Resolution: Duplicate
-
P4
-
19, 20
-
riscv
Current GCC 11 RISC-V builds fail with:
```
* For target hotspot_variant-server_libjvm_objs_c1_LIRAssembler.o:
In file included from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.hpp:28,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.cpp:30:
In member function 'void PatchingStub::install(MacroAssembler*, LIR_PatchCode, Register, CodeEmitInfo*)',
inlined from 'void PatchingStub::install(MacroAssembler*, LIR_PatchCode, Register, CodeEmitInfo*)' at /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_CodeStubs.hpp:423:8,
inlined from 'void LIR_Assembler::patching_epilog(PatchingStub*, LIR_PatchCode, Register, CodeEmitInfo*)' at /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.cpp:46:17:
/home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_CodeStubs.hpp:440:25: error: 'this' pointer is null [-Werror=nonnull]
440 | n_move->set_offset(field_offset);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/code/nativeInst.hpp:30,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_CodeStubs.hpp:33,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.hpp:28,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.cpp:30:
/home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/cpu/riscv/nativeInst_riscv.hpp: In member function 'void LIR_Assembler::patching_epilog(PatchingStub*, LIR_PatchCode, Register, CodeEmitInfo*)':
/home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/cpu/riscv/nativeInst_riscv.hpp:420:8: note: in a call to non-static member function 'void NativeMovRegMem::set_offset(int)'
420 | void set_offset(int x);
... (rest of output omitted)
```
I think the compiler is smart/dumb enough to see through `Unimplemented()` here and then complain about the nullity:
```
inline NativeMovRegMem* nativeMovRegMem_at (address addr) {
Unimplemented();
return NULL;
}
```
```
* For target hotspot_variant-server_libjvm_objs_c1_LIRAssembler.o:
In file included from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.hpp:28,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.cpp:30:
In member function 'void PatchingStub::install(MacroAssembler*, LIR_PatchCode, Register, CodeEmitInfo*)',
inlined from 'void PatchingStub::install(MacroAssembler*, LIR_PatchCode, Register, CodeEmitInfo*)' at /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_CodeStubs.hpp:423:8,
inlined from 'void LIR_Assembler::patching_epilog(PatchingStub*, LIR_PatchCode, Register, CodeEmitInfo*)' at /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.cpp:46:17:
/home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_CodeStubs.hpp:440:25: error: 'this' pointer is null [-Werror=nonnull]
440 | n_move->set_offset(field_offset);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/code/nativeInst.hpp:30,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_CodeStubs.hpp:33,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.hpp:28,
from /home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/share/c1/c1_LIRAssembler.cpp:30:
/home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/cpu/riscv/nativeInst_riscv.hpp: In member function 'void LIR_Assembler::patching_epilog(PatchingStub*, LIR_PatchCode, Register, CodeEmitInfo*)':
/home/buildbot/worker/build-jdkX-debian12/build/src/hotspot/cpu/riscv/nativeInst_riscv.hpp:420:8: note: in a call to non-static member function 'void NativeMovRegMem::set_offset(int)'
420 | void set_offset(int x);
... (rest of output omitted)
```
I think the compiler is smart/dumb enough to see through `Unimplemented()` here and then complain about the nullity:
```
inline NativeMovRegMem* nativeMovRegMem_at (address addr) {
Unimplemented();
return NULL;
}
```
- duplicates
-
JDK-8290496 riscv: Fix build warnings-as-errors with GCC 11
-
- Resolved
-