stage3/flow_control_analysis.cc
changeset 448 1bd18fc06911
parent 443 ff4d26b7e51d
child 452 79ac274d1cc4
--- a/stage3/flow_control_analysis.cc	Fri Feb 17 19:47:58 2012 +0000
+++ b/stage3/flow_control_analysis.cc	Sat Feb 18 21:03:01 2012 +0000
@@ -112,8 +112,9 @@
 /*| instruction_list il_instruction */
 // SYM_LIST(instruction_list_c)
 void *flow_control_analysis_c::visit(instruction_list_c *symbol) {
-	for(int i = 1; i < symbol->n; i++) {
-		prev_il_instruction = symbol->elements[i-1];
+	for(int i = 0; i < symbol->n; i++) {
+		prev_il_instruction = NULL;
+		if (i > 0) prev_il_instruction = symbol->elements[i-1];
 		symbol->elements[i]->accept(*this);
 	}
 	return NULL;