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
When compiled without SSA, it does not print "not reached". However, when compiled with SSA, it does print "not reached". Based on my understanding of the spec, this program should not print "not reached" because the evaluation of x.Close to a function value happens on the defer line and should cause a nil panic (though either way it shouldn't change with SSA).
$ go run -gcflags -ssa=0 x.go
panic: runtime error: invalid memory address or nil pointer dereference
...
$ go run x.go
not reached
panic: runtime error: invalid memory address or nil pointer dereference
This pattern appears in test/fixedbugs/issue6055.go.
The following program behaves differently depending on whether or not it's compiled with SSA:
When compiled without SSA, it does not print "not reached". However, when compiled with SSA, it does print "not reached". Based on my understanding of the spec, this program should not print "not reached" because the evaluation of
x.Close
to a function value happens on the defer line and should cause a nil panic (though either way it shouldn't change with SSA).This pattern appears in
test/fixedbugs/issue6055.go
./cc @cherrymui @randall77
The text was updated successfully, but these errors were encountered: