diff options
| author | Michael Forney <mforney@mforney.org> | 2019-11-25 20:48:12 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2019-11-25 20:48:12 -0800 |
| commit | 12734139a3490cb1c630dbfdeb5172b31dfb510e (patch) | |
| tree | b63e28b57ae6fa73c969ea82358ad118ed272096 /pkg/qbe/patch | |
| parent | d3c5785b0ee551ba6eda42734b068f8a179983dd (diff) | |
qbe: Update to latest git
Diffstat (limited to 'pkg/qbe/patch')
| -rw-r--r-- | pkg/qbe/patch/0012-copy-Fix-use-of-compound-literal-outside-its-scope.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/pkg/qbe/patch/0012-copy-Fix-use-of-compound-literal-outside-its-scope.patch b/pkg/qbe/patch/0012-copy-Fix-use-of-compound-literal-outside-its-scope.patch deleted file mode 100644 index 1639f6a7..00000000 --- a/pkg/qbe/patch/0012-copy-Fix-use-of-compound-literal-outside-its-scope.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 16e9c4852eb471f9a96219ab38b6bb44a8d49ac9 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Wed, 20 Nov 2019 00:01:42 -0800 -Subject: [PATCH] copy: Fix use of compound literal outside its scope - -C99 6.5.2.5p6: -> If the compound literal occurs outside the body of a function, -> the object has static storage duration; otherwise, it has automatic -> storage duration associated with the enclosing block. - -So, we can't use the address of a compound literal here. Instead, -just set p to NULL, and make the loop conditional on p being non-NULL. ---- - copy.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/copy.c b/copy.c -index 3aa3b98..6fb0f98 100644 ---- a/copy.c -+++ b/copy.c -@@ -77,7 +77,7 @@ phisimpl(Phi *p, Ref r, Ref *cpy, Use ***pstk, BSet *ts, BSet *as, Fn *fn) - while (nstk) { - u = stk[--nstk]; - if (u->type == UIns && iscopy(u->u.ins, r, fn)) { -- p = &(Phi){.narg = 0}; -+ p = NULL; - t = u->u.ins->to.val; - } - else if (u->type == UPhi) { -@@ -89,13 +89,15 @@ phisimpl(Phi *p, Ref r, Ref *cpy, Use ***pstk, BSet *ts, BSet *as, Fn *fn) - if (bshas(ts, t)) - continue; - bsset(ts, t); -- for (a=0; a<p->narg; a++) { -- r1 = copyof(p->arg[a], cpy); -- if (req(r1, r)) -- continue; -- if (rtype(r1) != RTmp) -- return; -- bsset(as, r1.val); -+ if (p) { -+ for (a=0; a<p->narg; a++) { -+ r1 = copyof(p->arg[a], cpy); -+ if (req(r1, r)) -+ continue; -+ if (rtype(r1) != RTmp) -+ return; -+ bsset(as, r1.val); -+ } - } - u = fn->tmp[t].use; - u1 = &u[fn->tmp[t].nuse]; --- -2.24.0 - |
