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

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Sam James from comment #6)
> ```
> char *c;
> int b, d, e;
> 
> static void f(char *g, char *h) {
>   char a[1024] = {};
>   c = a;
>   for (; g < h; g++)
>     if (b)
>       ++d;
> }
> 
> int main() { f("somepage.html", "" + e); }
> ```

I've been looking at this on/off for a while because it didn't feel right. A
friend pointed out that it's UB to compare distinct objects, duh. The original
code looks like this too. I think it's therefore INVALID.

The remaining question is: is -fno-strict-aliasing supposed to disable pointer
provenance analysis as QOI or is it purely for TBAA?

Reply via email to