[llvm-dev] error: ordered comparison between pointer and zero ('address' (aka 'unsigned char *') and 'int')

Thomas Schatzl via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 19 04:37:54 PDT 2018


Hi,

On Thu, 2018-07-19 at 18:56 +0800, Leslie Zhai wrote:
> Hi HotSpot and LLVM developers,
> 
> I am building OpenJDK8[1] with LLVM toolchain[2] for mips64el, it
> failed to build:
> 
> 
> /home/loongson/jdk8-mips/hotspot/src/share/vm/opto/lcm.cpp:52:35:
> error: 
> ordered comparison between pointer and zero ('address' (aka
> 'unsigned 
> char *') and 'int')
>    if (Universe::narrow_oop_base() > 0) { // Implies
> UseCompressedOops.
>        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
> 
> 
> Just like compiling Linux kernel with LLVM for mips64el[3], the bug 
> could be fixed both in Compiler side and HotSpot side, please give
> me some suggestion, thanks a lot! And my sincere thanks will go to
> Nick who helped me a lot!

  this has been fixed in the jvm in JDK10 with https://bugs.openjdk.jav
a.net/browse/JDK-8174050 .

It has not been backported to jdk8; others may be able to tell you if
it can/will be backported.

Thanks,
  Thomas

> 
> 1. http://hg.loongnix.org/
> 2. Loongson clang version 7.0.0 
> (git at github.com:Loong-Language/loong-clang.git 
> c36069cffc57a30a20782bf327a87bed4e48a6c2) 
> (git at github.com:Loong-Language/loong-llvm.git 
> 59cb663e72874dda740aa2b18bf47ba65b32fe9b) (based on LLVM 7.0.0svn)
> Target: mips64el-redhat-linux
> Thread model: posix
> InstalledDir: /opt/loong-llvm/bin
> Found candidate GCC installation: /usr/lib/gcc/mips64el-redhat-
> linux/4.9.3
> Selected GCC installation: /usr/lib/gcc/mips64el-redhat-linux/4.9.3
> Candidate multilib: .;
> Selected multilib: .;
> 3. http://lists.llvm.org/pipermail/llvm-dev/2018-July/124620.html
> 



More information about the llvm-dev mailing list