]> Cypherpunks repositories - gostls13.git/commitdiff
gc: fix crash on complicated arg to make slice.
authorRuss Cox <rsc@golang.org>
Sat, 6 Mar 2010 03:29:14 +0000 (19:29 -0800)
committerRuss Cox <rsc@golang.org>
Sat, 6 Mar 2010 03:29:14 +0000 (19:29 -0800)
Fixes #615.

R=ken2
CC=golang-dev
https://golang.org/cl/255043

src/cmd/gc/walk.c

index 5ee82eeac7943cbf6310dd4f5da23b7ebc809338..1f7312e5e05e528639d0aac33c8c1ee92f1cb671 100644 (file)
@@ -1078,7 +1078,7 @@ walkexpr(Node **np, NodeList **init)
                t = n->type;
                fn = syslook("makeslice", 1);
                argtype(fn, t->type);                   // any-1
-               n = mkcall1(fn, n->type, nil,
+               n = mkcall1(fn, n->type, init,
                        typename(n->type),
                        conv(n->left, types[TINT]),
                        conv(n->right, types[TINT]));