]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/ssa: handle loops that don't loop
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 4 Jul 2015 16:07:54 +0000 (09:07 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 5 Jul 2015 03:52:34 +0000 (03:52 +0000)
commit6c14059e65b180e3aaf34774b67ddffa461cf3c2
tree746031bb1742ea153121e6bb936be8dd88ca94a3
parentd465f049cd364c3e445fe189ae0fac0dffda2a67
[dev.ssa] cmd/compile/ssa: handle loops that don't loop

Loops such as

func f(c chan int) int {
for x := range c {
return x
}
return 0
}

don't loop. Remove the assumption that they must.

Partly fixes the build.

Change-Id: I766cebeec8e36d14512bea26f54c06c8eaf95e23
Reviewed-on: https://go-review.googlesource.com/11876
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go