summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-14 16:12:25 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:31 -0400
commit730bce080ca9402dab010d85eba0d80b84940000 (patch)
treee2d05d24041225db3fdf080482566b9af6456ff3
parent67d3c2834d61026d5556cf9846f707844109cf33 (diff)
downloadroux-730bce080ca9402dab010d85eba0d80b84940000.tar.gz
avoid depending on uninitialized r
-rw-r--r--lisc/rega.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisc/rega.c b/lisc/rega.c
index df4d2aa..703a93b 100644
--- a/lisc/rega.c
+++ b/lisc/rega.c
@@ -352,7 +352,8 @@ rega(Fn *fn)
 				}
 				if (i->to.val >= Tmp0)
 					i->to = reg(r, i->to.val);
-			}
+			} else
+				r = 0;
 			if (rtype(i->arg[0]) == RTmp) {
 				/* <arch>
 				 *   on Intel, we attempt to