RFR: 8174050: Compilation errors with clang-4.0

Martin Buchholz martinrb at google.com
Wed Aug 23 23:37:01 UTC 2017


Thanks, Vladimir.
Webrev regenerated.

I blindly coded

-      assert(rng->Opcode() == Op_LoadRange ||
_igvn.type(rng)->is_int() >= 0, "must be");+      assert(rng->Opcode()
== Op_LoadRange || _igvn.type(rng)->is_int()->_lo >= 0, "must be");



On Wed, Aug 23, 2017 at 3:39 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com
> wrote:

> Thank you, Martin
>
> Yes, sign compare is bad for pointers.
>
> Note, for pointers compare with use NULL instead of 0. Please, use NULL.
>
> The assert check in loopPredicate.cpp is simple missing reference to field
> _lo (low bound of values range):
>
>  _igvn.type(rng)->is_int()->_lo >= 0
>
> Please, fix it this way.
>
> Thanks,
> Vladimir
>
>
> On 8/23/17 2:25 PM, Martin Buchholz wrote:
>
>> https://bugs.openjdk.java.net/browse/JDK-8174050
>> http://cr.openjdk.java.net/~martin/webrevs/openjdk10/pointer
>> -sign-comparison/
>>
>> My webrev could go in as is, but better would be for someone to figure out
>> the intent of the nonsensical assert in
>>
>> src/share/vm/opto/loopPredicate.cpp
>>
>> (There is more to be done to support clang, but this is enough to build
>> openjdk without patching source)
>>
>>


More information about the hotspot-dev mailing list