summaryrefslogtreecommitdiff
path: root/src/cmd/gc/sinit.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-06-23 15:30:59 -0700
committerRuss Cox <rsc@golang.org>2009-06-23 15:30:59 -0700
commita0c530d3651927d53dda48982677a282b86e2d2b (patch)
treedf2ed04ac9a90044ab7a2ea9a637bb4caba7bb5f /src/cmd/gc/sinit.c
parent9998ffdb78e6706805c52c2c39428cff6f31506d (diff)
downloadgolang-a0c530d3651927d53dda48982677a282b86e2d2b.tar.gz
fix a 6g crash after type errors.
do not bother warning about marks left on stack after syntax errors. leave OCONV nodes in tree to avoid type errors arising from multiple walks. R=ken OCL=30639 CL=30662
Diffstat (limited to 'src/cmd/gc/sinit.c')
-rw-r--r--src/cmd/gc/sinit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/gc/sinit.c b/src/cmd/gc/sinit.c
index 8fe352391..021b03014 100644
--- a/src/cmd/gc/sinit.c
+++ b/src/cmd/gc/sinit.c
@@ -144,6 +144,9 @@ slicerewrite(Node *n)
int b;
Node *a;
+ while(n->op == OCONVNOP)
+ n = n->left;
+
// call to newarray - find nel argument
nel = findarg(n, "nel", "newarray");
if(nel == N || !isslice(n->type))