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

fix error converting result of complex

division. resolves issue 1261.

R=rsc
CC=golang-dev
https://golang.org/cl/2985043
This commit is contained in:
Ken Thompson 2010-11-09 17:39:36 -08:00
parent 56bfe95e7f
commit cb3754fd43

View File

@ -1005,9 +1005,11 @@ walkexpr(Node **np, NodeList **init)
*/
et = n->left->type->etype;
if(iscomplex[et] && n->op == ODIV) {
n = mkcall("complex128div", n->type, init,
t = n->type;
n = mkcall("complex128div", types[TCOMPLEX128], init,
conv(n->left, types[TCOMPLEX128]),
conv(n->right, types[TCOMPLEX128]));
n = conv(n, t);
goto ret;
}
/*