aboutsummaryrefslogtreecommitdiff
path: root/alias.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2019-02-18 13:47:33 +0100
committerQuentin Carbonneaux <[email protected]>2019-02-18 13:56:03 +0100
commitcde5f95591b6f38df235ac16ee7ee979ec19bd09 (patch)
tree84443f9ab1c20761b59c833e66a804144ae62235 /alias.c
parentd9b0d77cf20cb8340bc4a77b66aa8cb56c75b496 (diff)
mark phi arguments as escaping
Thanks to Michael Forney for spotting this oversight and providing the test case. Note: because esc() leaves ABot unchanged, the assertion "a->type == ABot" on line 122 remains valid.
Diffstat (limited to 'alias.c')
-rw-r--r--alias.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/alias.c b/alias.c
index 66c12e5..aa3846e 100644
--- a/alias.c
+++ b/alias.c
@@ -106,7 +106,7 @@ esc(Ref r, Fn *fn)
void
fillalias(Fn *fn)
{
- uint n;
+ uint n, m;
Blk *b;
Phi *p;
Ins *i;
@@ -115,6 +115,8 @@ fillalias(Fn *fn)
for (n=0; n<fn->nblk; ++n) {
b = fn->rpo[n];
for (p=b->phi; p; p=p->link) {
+ for (m=0; m<p->narg; m++)
+ esc(p->arg[m], fn);
assert(rtype(p->to) == RTmp);
a = &fn->tmp[p->to.val].alias;
assert(a->type == ABot);