overlapping copy semantics question
Bruce Carneal
bcarneal at gmail.com
Mon May 20 12:37:32 UTC 2024
Given the possibility for overlap is it correct that the two copy
functions in the godbolt example compile to identical code?
https://godbolt.org/z/jPhT5vhee
I think the @restrict function is compiled correctly since the
compiler is free to assume no overlap, but the code generated for
the unattributed variant appears to be off. Perhaps I'm
misunderstanding something wrt copy semantics?
As a point of reference, when compiled with gdc the code
generated for the two functions is not identical.
More information about the digitalmars-d-ldc
mailing list