diff --git a/src/cmd/gc/gen.c b/src/cmd/gc/gen.c index 249d0fde05b..1302ae10c62 100644 --- a/src/cmd/gc/gen.c +++ b/src/cmd/gc/gen.c @@ -439,10 +439,13 @@ cgen_as(Node *nl, Node *nr) } // externals and heaps should already be clear - if(nl->class == PEXTERN) - return; - if(nl->class & PHEAP) - return; + if(nr == N) { + if(nl->class == PEXTERN) + return; + if(nl->class & PHEAP) + return; + } + tl = nl->type; if(tl == T) return;