https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93249

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #5)
> "Proven not to contain any zeros in the first N bytes" where N is the source
> offset in strncpy, would suggest the strlen pass might be more suitable for
> this transformation than DSE.

That is not really possible, because the change it is doing heavily relies on
the DSE pass infrastructure as well as being called from within it.
With get_range_strlen, it can handle some cases, and will just avoid head
trimming of strncpy otherwise, no big deal.  Tail trimming and full trimming is
still possible.

Reply via email to