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

Hao Sun github.com+16932759+shqking at openjdk.java.net
Wed Jan 6 14:29:00 UTC 2021


On Wed, 6 Jan 2021 04:34:36 GMT, Hao Sun <github.com+16932759+shqking at openjdk.org> wrote:

>> Thanks for your explanation. Yes, you're right. I didn't realize the re-assignment scenario.
>
> @vnkozlov I was wondering if you could take a look at this? We're not sure whether 'operator=' is problematic or not. Thanks.

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.

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

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



More information about the build-dev mailing list