]> Cypherpunks repositories - gostls13.git/commitdiff
gc funarg return fix.
authorRuss Cox <rsc@golang.org>
Sun, 8 Feb 2009 19:01:52 +0000 (11:01 -0800)
committerRuss Cox <rsc@golang.org>
Sun, 8 Feb 2009 19:01:52 +0000 (11:01 -0800)
change type (to satisfy OAS) after nodarg:
nodarg uses offset from type too,
and must use correct offset.

R=ken
OCL=24656
CL=24656

src/cmd/gc/walk.c

index 73313ba20d22b390598f855f9df0b57f94b677ea..87e4fae4754cc9de9e9f64e2c3c308890dac4476 100644 (file)
@@ -1905,8 +1905,11 @@ ascompatte(int op, Type **nl, Node **nr, int fp)
        if(l != T && r != N
        && structnext(&peekl) != T
        && listnext(&peekr) == N
-       && eqtypenoname(r->type, *nl))
-               return convas(nod(OAS, nodarg(r->type, fp), r));
+       && eqtypenoname(r->type, *nl)) {
+               a = nodarg(*nl, fp);
+               a->type = r->type;
+               return convas(nod(OAS, a, r));
+       }
 
 loop:
        if(l != T && isddd(l->type)) {