• Russ Cox's avatar
    cmd/gc: fix escape analysis bug · 71282131
    Russ Cox authored
    The code assumed that the only choices were EscNone, EscScope, and EscHeap,
    so that it makes sense to set EscScope only if the current setting is EscNone.
    Now that we have the many variants of EscReturn, this logic is false, and it was
    causing important EscScopes to be ignored in favor of EscReturn.
    
    Fixes #4360.
    
    R=ken2
    CC=golang-dev, lvd
    https://golang.org/cl/6816103
    71282131
escape5.go 3.2 KB