Commit 32df6788 authored by Russ Cox's avatar Russ Cox

gc: bug264

Fixes #692.

R=ken2
CC=golang-dev
https://golang.org/cl/1092041
parent f8f83e80
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment