diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c
index 9b20ee4f6fa58f865ad3b107c54068a73f1ee482..6bae9833ac4355c126e6c6b3410140e7bd8101d1 100644
--- a/src/cmd/gc/subr.c
+++ b/src/cmd/gc/subr.c
@@ -700,6 +700,8 @@ Lconv(Fmt *fp)
 
 	n = 0;
 	for(h=hist; h!=H; h=h->link) {
+		if(h->offset < 0)
+			continue;
 		if(lno < h->line)
 			break;
 		if(h->name) {