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

ak at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-06-29
                 CC|                            |ak at gcc dot gnu.org

--- Comment #9 from ak at gcc dot gnu.org ---
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);
}

>From the one it seems to be invalid because the c global is indeed NULL.

but it's hard to say if it is exactly equivalent because it will depend on the
caller and the original test case had something like 30+ callers, so we don't
know the exact context.

Problem is that these warnings which depend on inlining should really print the
inline stack for the instance that triggers the warning. I opened PR115704

Reply via email to