mirror of
https://github.com/golang/go
synced 2024-11-22 01:34:41 -07:00
gc: bug264
Fixes #692. R=ken2 CC=golang-dev https://golang.org/cl/1092041
This commit is contained in:
parent
f8f83e80b1
commit
32df678894
@ -31,8 +31,10 @@ init1(Node *n, NodeList **out)
|
||||
case PFUNC:
|
||||
break;
|
||||
default:
|
||||
if(isblank(n))
|
||||
if(isblank(n) && n->defn != N && !n->defn->initorder) {
|
||||
n->defn->initorder = 1;
|
||||
*out = list(*out, n->defn);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -8,27 +8,22 @@
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
var fooCount = 0
|
||||
var barCount = 0
|
||||
var balCount = 0
|
||||
|
||||
func foo() (int, int) {
|
||||
fooCount++
|
||||
fmt.Println("foo")
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
func bar() (int, int) {
|
||||
barCount++
|
||||
fmt.Println("bar")
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
func bal() (int, int) {
|
||||
balCount++
|
||||
fmt.Println("bal")
|
||||
return 0, 0
|
||||
}
|
||||
|
@ -177,14 +177,3 @@ panic PC=xxx
|
||||
=========== bugs/bug260.go
|
||||
FAIL
|
||||
BUG: bug260 failed
|
||||
|
||||
=========== bugs/bug264.go
|
||||
foo
|
||||
bar
|
||||
bar
|
||||
bal
|
||||
bal
|
||||
panic: barCount != 1
|
||||
|
||||
panic PC=xxx
|
||||
BUG
|
||||
|
Loading…
Reference in New Issue
Block a user