From: Russ Cox Date: Fri, 16 Jan 2009 01:32:31 +0000 (-0800) Subject: don't crash on: X-Git-Tag: weekly.2009-11-06~2359 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c1e7e270f11feb9adb834f973ab07c0090dcef08;p=gostls13.git don't crash on: package main var x int type x struct { a int } R=ken OCL=22903 CL=22903 --- diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c index aab47b6539..50967b53e3 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c @@ -63,7 +63,7 @@ dodcltype(Type *n) // if n has been forward declared, // use the Type* created then s = n->sym; - if(s->block == block) { + if(s->block == block && s->otype != T) { switch(s->otype->etype) { case TFORWSTRUCT: case TFORWINTER: