| commit | c1e7e270f11feb9adb834f973ab07c0090dcef08 | [log] [tgz] |
|---|---|---|
| author | Russ Cox <rsc@golang.org> | Thu Jan 15 17:32:31 2009 -0800 |
| committer | Russ Cox <rsc@golang.org> | Thu Jan 15 17:32:31 2009 -0800 |
| tree | 6360d9e4a5fba27db160a6633f14a20098a812fc | |
| parent | 8a7cbadbbe9768ccd7480bb11e35454e39ef2bdd [diff] |
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 aab47b6..50967b5 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c
@@ -63,7 +63,7 @@ // 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: