summaryrefslogtreecommitdiff
path: root/src/cmd/gc/cplx.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-04-06 15:14:11 +0200
committerOndřej Surý <ondrej@sury.org>2012-04-06 15:14:11 +0200
commit505c19580e0f43fe5224431459cacb7c21edd93d (patch)
tree79e2634c253d60afc0cc0b2f510dc7dcbb48497b /src/cmd/gc/cplx.c
parent1336a7c91e596c423a49d1194ea42d98bca0d958 (diff)
downloadgolang-505c19580e0f43fe5224431459cacb7c21edd93d.tar.gz
Imported Upstream version 1upstream/1
Diffstat (limited to 'src/cmd/gc/cplx.c')
-rw-r--r--src/cmd/gc/cplx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd/gc/cplx.c b/src/cmd/gc/cplx.c
index 890cf7f10..dea7bc3bb 100644
--- a/src/cmd/gc/cplx.c
+++ b/src/cmd/gc/cplx.c
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+#include <u.h>
+#include <libc.h>
#include "gg.h"
static void subnode(Node *nr, Node *ni, Node *nc);
@@ -131,6 +133,9 @@ complexgen(Node *n, Node *res)
dump("\ncomplexgen-n", n);
dump("complexgen-res", res);
}
+
+ while(n->op == OCONVNOP)
+ n = n->left;
// pick off float/complex opcodes
switch(n->op) {
@@ -199,6 +204,8 @@ complexgen(Node *n, Node *res)
case OIND:
case ONAME: // PHEAP or PPARAMREF var
case OCALLFUNC:
+ case OCALLMETH:
+ case OCALLINTER:
igen(n, &n1, res);
complexmove(&n1, res);
regfree(&n1);