From a6c59ce2744182a1b6badd78c4269d1b424dd080 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 8 Feb 2009 11:01:52 -0800 Subject: [PATCH] gc funarg return fix. 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index 73313ba20d2..87e4fae4754 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -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)) {