logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 12734139a3490cb1c630dbfdeb5172b31dfb510e
parent d3c5785b0ee551ba6eda42734b068f8a179983dd
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 25 Nov 2019 20:48:12 -0800

qbe: Update to latest git

Diffstat:

Dpkg/qbe/patch/0012-copy-Fix-use-of-compound-literal-outside-its-scope.patch55-------------------------------------------------------
Mpkg/qbe/ver2+-
2 files changed, 1 insertion(+), 56 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 @@ -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 - diff --git a/pkg/qbe/ver b/pkg/qbe/ver @@ -1 +1 @@ -acc3af4733 r2 +190263f1b6 r0