Commit 09b2de77 authored by Ken Thompson's avatar Ken Thompson

fix bug 275

R=rsc
CC=golang-dev
https://golang.org/cl/1198046
parent 9e497c36
......@@ -129,12 +129,18 @@ complexgen(Node *n, Node *res)
return;
case OREAL:
subnode(&n1, &n2, n->left);
case OIMAG:
nl = n->left;
if(!nl->addable) {
tempname(&tmp, nl->type);
complexgen(nl, &tmp);
nl = &tmp;
}
subnode(&n1, &n2, nl);
if(n->op == OREAL) {
cgen(&n1, res);
return;
case OIMAG:
subnode(&n1, &n2, n->left);
}
cgen(&n2, res);
return;
}
......
......@@ -180,7 +180,3 @@ BUG: bug260 failed
=========== bugs/bug274.go
BUG: errchk: command succeeded unexpectedly
=========== bugs/bug275.go
bugs/bug275.go:17: internal compiler error: subnode not addable
BUG should compile
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