shithub: scc

Download patch

ref: 392cc961cb76599a756e455697543779308a16f8
parent: 4e4f69b83975a5306469d130e322ab7425c2bfdd
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jan 20 03:18:16 EST 2017

[cc2-qbe] Add SLOCAL case to symname()

This case was lost in the switch and it was the reason why
local static variables caused an abort().

--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -186,6 +186,7 @@
 		case SGLOB:
 			sprintf(buff, "%c%s", c, sym->name);
 			return buff;
+		case SLOCAL:
 		case SPRIV:
 		case SAUTO:
 			sprintf(buff, "%c%s.%u", c, sym->name, sym->id);