--- Comment #4 from Jakub Jelinek <jakub at gcc dot> ---
(In reply to Martin Liška from comment #2)
> I guess it somehow confuses VRP, Martin can you please take a look? Note
> that __builtin___sanitizer_cov_trace_pc is pure function, can't modify
> memory in original program.

No, __builtin___sanitizer_cov_trace_pc is certainly not pure and can't really
be, otherwise would optimize them all away (nothing uses their void return
so the problem is that it invalidates all recorded string lengths, at least
those that escape (but in this testcase it is a global variable).
As __sanitizer_cov_trace_pc is a user-supplied function, I don't really think
we can assume anything on it (e.g. that it will not change any global or
escaped local variables, it can change them and most likely will do at least
some of them, otherwise it would be useless).

Reply via email to