1
0
mirror of https://github.com/golang/go synced 2024-11-21 13:34:39 -07:00

gc: fix build - subnode not addable in complexgen

R=ken2
CC=golang-dev
https://golang.org/cl/1677047
This commit is contained in:
Russ Cox 2010-06-20 11:21:43 -07:00
parent d67717c29b
commit ceb868bf0a

View File

@ -121,12 +121,15 @@ complexgen(Node *n, Node *res)
// pick off float/complex opcodes
switch(n->op) {
case OCMPLX:
subnode(&n1, &n2, res);
tempname(&tmp, n1.type);
cgen(n->left, &tmp);
cgen(n->right, &n2);
cgen(&tmp, &n1);
return;
if(res->addable) {
subnode(&n1, &n2, res);
tempname(&tmp, n1.type);
cgen(n->left, &tmp);
cgen(n->right, &n2);
cgen(&tmp, &n1);
return;
}
break;
case OREAL:
case OIMAG: