shithub: scc

Download patch

ref: 9607a8811f32fa164f8f33b62d56fa61c8cdb292
parent: 4119797b7b822ec09e1d8b1069d80f4737bfac16
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jan 20 05:00:44 EST 2017

[cc2-qbe] Initialize children pointers in tmpnode()

Not always them were initialized, mainly when it received
a pointer to some already allocated node.

--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -105,6 +105,7 @@
 	sym = getsym(TMPSYM);
 	sym->type = np->type = *tp;
 	sym->kind = STMP;
+	np->left = np->right = NULL;
 	np->u.sym = sym;
 	np->op = OTMP;
 	np->flags |= ISTMP;