summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
Diffstat (limited to '6')
-rw-r--r--6/simp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/6/simp.c b/6/simp.c
index 1f2aee3..862aac8 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -1540,8 +1540,12 @@ static Node *rval(Simp *s, Node *n, Node *dst)
append(s, mkexpr(n->loc, Oret, NULL));
break;
case Oasn:
- if (tybase(exprtype(n))->type != Tyvoid)
+ if (tybase(exprtype(n))->type == Tyvoid) {
+ if (!ispure(args[1]))
+ r = rval(s, args[1], NULL);
+ } else {
r = assign(s, args[0], args[1]);
+ }
break;
case Ocall:
r = simpcall(s, n, dst);