JDK-8224851 : AArch64: fix warnings and errors with Clang and GCC 8.3
  • Type: Task
  • Component: hotspot
  • Sub-Component: other
  • Affected Version: 8-aarch64,11,13
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2019-05-28
  • Updated: 2024-03-22
  • Resolved: 2019-06-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 8 Other
11.0.15-oracleFixed 13.0.4Fixed 14 b02Fixed 8u351Fixed openjdk8u292Fixed
Related Reports
Duplicate :  
Relates :  
Description
These are all AArch64 specific:

/home/nicgas01/jdk/src/hotspot/cpu/aarch64/assembler_aarch64.hpp:279:22: error: & has lower precedence than ==; == will be evaluated first [-Werror,-Wparentheses]
    assert_cond(bits & mask == mask);
                     ^~~~~~~~~~~~~~                                                                                                                                                            
                                                                                                                                                                                               /home/nicgas01/jdk/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp:44:25: error: redeclaration of using declaration
  using MacroAssembler::call_VM_leaf_base;
        ~~~~~~~~~~~~~~~~^


/home/nicgas01/jdk/src/hotspot/cpu/aarch64/aarch64.ad:13866:80: error: invalid suffix 'D' on floating constant
    __ fcmps(as_FloatRegister(opnd_array(1)->reg(ra_,this,idx1)/* src1 */), 0.0D);
                                                                               ^                                                                                                               

/home/nicgas01/jdk/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp:429:66: error: implicit conversion of NULL constant to 'bool' [-Werror,-Wnull-conversion]
  arithmetic_op_fpu(x->op(), reg, left.result(), right.result(), NULL);
  ~~~~~~~~~~~~~~~~~                                              ^~~~
                                                                 false

/home/nicgas01/jdk/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp:1074:24: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
      if (is_unordered && op->cond() == lir_cond_equal
          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


/home/nicgas01/jdk/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.s:162:32: error: index must be a multiple of 8 in range [0, 32760].
        prfm    pldl1keep, [s, #-256]
                               ^

/home/nicgas01/jdk/src/hotspot/os_cpu/linux_aarch64/atomic_linux_aarch64.hpp:43:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'unsigned long'
    return __sync_add_and_fetch(dest, add_value);
                                      ^~~~~~~~~

/home/nicgas01/jdk/src/hotspot/share/runtime/atomic.hpp:659:45: note: in instantiation of function template specialization 'Atomic::PlatformAdd<8>::add_and_fetch<unsigned long, char *>' requ\
ested here
  return static_cast<const Derived*>(this)->add_and_fetch(add_value, dest, order);
                                            ^

/home/nicgas01/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2684:17: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
    offset &= -1<<12;
              ~~^
                                                                                                                                                                                               /home/nicgas01/jdk/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp:679:8: error: conflicting types for '_Copy_conjoint_jshorts_atomic'
  void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
       ^

/home/nicgas01/jdk/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp:177:13: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
      if (p = strchr(buf, ':')) {
          ~~^~~~~~~~~~~~~~~~~~

/home/nicgas01/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2684:17: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
    offset &= -1<<12;
              ~~^
Comments
GitHub: https://github.com/openjdk/jdk/commit/a0a919603c1546ce86fe659df3636b5a24b9caeb
15-11-2021

Fix request for [13u] https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-May/003176.html Backport need for code base alignment mostly. Patch applies with modifications http://cr.openjdk.java.net/~snazarki/webrev/8224851/
27-05-2020

Fix Request [11u]: Change fixes issues discovered when building with the latest GCC 10 on Fedora Successful review from Aleksey here: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-January/002433.html
29-01-2020

RFR for 11u: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-January/002432.html
29-01-2020

URL: http://hg.openjdk.java.net/jdk/jdk/rev/e53ec3b362f4 User: njian Date: 2019-06-17 09:04:33 +0000
17-06-2019

Review thread: https://mail.openjdk.java.net/pipermail/build-dev/2019-May/025639.html
31-05-2019