[dev.power64] 5g: fix etype and width of itable Addrs

For OITAB nodes, 5g's naddr was setting the wrong etype and
failing to set the width of the resulting Addr.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/171220043
This commit is contained in:
Austin Clements 2014-11-06 15:35:53 -05:00
parent 22c929f538
commit e156f0e997
1 changed files with 2 additions and 1 deletions

View File

@ -1353,9 +1353,10 @@ naddr(Node *n, Addr *a, int canemitcode)
case OITAB:
// itable of interface value
naddr(n->left, a, canemitcode);
a->etype = TINT32;
a->etype = simtype[tptr];
if(a->type == D_CONST && a->offset == 0)
break; // len(nil)
a->width = widthptr;
break;
case OSPTR: