[Bug c/95044] [10/11 Regression] -Wreturn-local-addr false alarm since r10-1741-gaac9480da1ffd037

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 11 10:05:09 GMT 2020


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

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
I think there is another very similar bug report.

  # buf_1 = PHI <&stack_buf(2), buf_15(6)>
[...]
  if (&stack_buf != buf_1)

in each branch, we thus know what buf_1 is, so we could replace it with buf_15
in

  # _3 = PHI <_17(5), buf_1(4)>
  return _3;

(or is that bad for register pressure?)

Or use it as a hint to thread that path, or add some logic to
Wreturn_local_addr, but that's getting more complicated.


More information about the Gcc-bugs mailing list