|
Dvyukov |
at Oct 10, 2012 at 2:09 pm
|
⇧ |
| |
*** Submitted as
http://code.google.com/p/go/source/detail?r=8209534dab87 ***
cmd/gc: fix compiler crash during race instrumentation
The compiler is crashing on the following code:
type TypeID int
func (t *TypeID) encodeType(x int) (tt TypeID, err error) {
switch x {
case 0:
return t.encodeType(x * x)
}
return 0, nil
}
The pass marks "return struct" {tt TypeID, err error} as used,
and this causes internal check failure.
I've added the test to:
https://codereview.appspot.com/6525052/diff/7020/src/pkg/runtime/race/regression_test.goR=golang-dev, minux.ma, rsc
CC=golang-dev
http://codereview.appspot.com/6611049http://codereview.appspot.com/6611049/