Descriptioncmd/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.go
Patch Set 1 #Patch Set 2 : diff -r dfb1b5655e21 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 3 : diff -r 3350c94fe6b7 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 4 : diff -r ba847b110365 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 5 : diff -r ba847b110365 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 6 : diff -r 72b15c5d6f65 https://dvyukov%40google.com@code.google.com/p/go/ #MessagesTotal messages: 5
|