https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115274
qinzhao at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |qinzhao at gcc dot gnu.org
--- Comment #11 from qinzhao at gcc dot gnu.org ---
(In reply to ak from comment #9)
> creduce minimized it to
>
> #include <string.h>
> char *c;
> void a();
> int b(char *d) { return strlen(d); }
> void e() {
> long f = 1;
> f = b(c + f);
> if (c == 0)
> a(f);
> }
>
with the above testing case, with the latest GCC15, when adding -fno-tree-sink,
the warning disappeared.
Actually, for this testing case, GCC is catching a real bug. The tree sinking
optimization exposes this real bug.