--- Comment #32 from Walter Bright <> ---
I filed two bug reports based on Tomer's work:

which have PRs:

The second example in comment 1 is a bug in the example, as:

    auto f() {auto x = g();}

should be:

    auto f() { return g();}

This addresses all the issues in examples provided. I.e. the escapes are
properly detected with -dip1000, and the structs don't move due to RVO (Return
Value Optimization) where the results are written into the caller's stack

If you discover more problems with escape detection and moved stack objects,
please let me know with examples. Thanks!


Reply via email to