shithub: scc

Download patch

ref: cd6d1548bbb6365822d9b690bb85b2b582778b2e
parent: 1e7ba5eee9a86e4e113959c95fca5129727b6d48
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat May 23 03:01:46 EDT 2015

Do not unlink non hashable symbols

There are temporal symbols, which are not part of the hash system,
so it is an error to remove them from the hash table.

--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -53,7 +53,8 @@
 		} else if (sym->ns == NS_TAG) {
 			sym->type->defined = 0;
 		}
-		htab[hash(sym->name)] = sym->hash;
+		if (sym->hash)
+			htab[hash(sym->name)] = sym->hash;
 		free(sym->name);
 		free(sym);
 	}