For: void foo (char **dest_ptr, char *src) { for (int i = 0; i < 100; ++i) (*dest_ptr)[i] = src[i]; } we should be able to emit a runtime alias check that [src, src+99] doesn't overlap *dest_ptr and then vectorise the loop normally.
For the cases when the overlap is exceedingly unlikely it would be helpful to issue a warning suggesting to qualify the function arguments with the restrict keyword. That would make it possible to avoid the runtime check.
Confirmed.
I think the issue is (*dest_ptr)[i] overlapping (*dest_ptr), 'src' doesn't even come into play here.