From ceb868bf0aaec012e238d5c01a642f19cbebab50 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 20 Jun 2010 11:21:43 -0700 Subject: [PATCH] gc: fix build - subnode not addable in complexgen R=ken2 CC=golang-dev https://golang.org/cl/1677047 --- src/cmd/gc/cplx.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/cmd/gc/cplx.c b/src/cmd/gc/cplx.c index 7da61c2471..95fafe6dde 100644 --- a/src/cmd/gc/cplx.c +++ b/src/cmd/gc/cplx.c @@ -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: