RFR: 8258010: Debug build failure with clang-10 due to -Wdeprecated-copy [v2]

Hao Sun github.com+16932759+shqking at openjdk.java.net
Thu Jan 7 23:43:55 UTC 2021


On Wed, 6 Jan 2021 20:05:07 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> I manually checked the usages of assignment operators for class DUIterator, DUIterator_Fast and DUIterator_Last. (Simply grep the class names in the source code and check the context). 
>> 
>> ~~I found there exist only a couple of re-assignment usages. However, I guess kind of reset operations are conducted in these sites, and I suspect  the implementation of `operator=` might be good.~~
>> 
>> As I examined, only the following 3 sites are found where re-assignment happens
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/cfgnode.cpp#L565
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/phaseX.cpp#L1878
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/split_if.cpp#L452
>> 
>> Please take `cfgnode.cpp` as an example. `j` is first assigned at line 568 and it would be assigned again if flag `progress` is true. ~~However, I suppose `j` gets reset at line 578 in such case.~~ Note that `j` might be re-assigned at line 578. However, it's self assignment and nothing is conducted.
>> 
>> ~~It might be incorrect if I missed something.~~
>> Hope that this finding would be helpful to analyze this problem.
>
> Code is correct. _last should not be updated with additional assignments which updates only node's information.

Thanks a lot for your explanation @vnkozlov .

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

PR: https://git.openjdk.java.net/jdk/pull/1874



More information about the build-dev mailing list