You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Save http://play.golang.org/p/Q7tUGUqD9k as select.go
2. ssadump -build=F select.go
What is the expected output?
That the SSA form for "func f() int" should not contain the final block; it is
not reachable, and it has an invalid Return statement (a bare Return, whereas the
function has >0 results).
What do you see instead?
func f() int:
.0.entry: P:0 S:2
t0 = select blocking [<-nil:chan int, <-nil:chan int] (index int, ok bool, int, int)
t1 = extract t0 #0 int
t2 = t1 == 0:int bool
if t2 goto 1.select.body else 2.select.next
.1.select.body: P:1 S:0
return 123:int
.2.select.next: P:1 S:2
t3 = t1 == 1:int bool
if t3 goto 3.select.body else 4.select.next
.3.select.body: P:1 S:0
return 456:int
.4.select.next: P:1 S:0
return
Which compiler are you using (5g, 6g, 8g, gccgo)?
N/A
Which operating system are you using?
N/A
Which version are you using? (run 'go version')
N/A
Please provide any additional information below.
I don't care too much about the unreachable block, but the invalid Return makes my
client code uglier than it ought to be. For now I'll treat bare Returns in functions
with >0 results as being unreachable.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: