[Bug middle-end/93644] [10 Regression] -Wreturn-local-addr July regression: new false-positive warning

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Feb 9 22:08:00 GMT 2020


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

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
  # buffer_2 = PHI <&stack_bufD.1939(3), buffer_7(D)(9)>

  buffer_18 = ASSERT_EXPR <buffer_2, buffer_2 != &stack_bufD.1939>;

Can't we deduce from this

  buffer_18 = buffer_7(D)

? Of course that's not a general solution, but it looks like a sensible
optimization, and in the reduced testcase it should remove &stack_buf from the
possible return values.


More information about the Gcc-bugs mailing list