scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit fa3a69095e3c841ba8bfc3a099c66e8f0112e47b
parent 4ae110b13a59d434253ce9d39aa231e0a01fee8d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 17 Aug 2016 15:52:51 +0200

[cc2-qbe] Fix lhs() with OMEM or OAUTO

Lhs() must put its return value in new, because callers expect that.

Diffstat:
Mcc2/arch/qbe/cgen.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -307,6 +307,7 @@ lhs(Node *np, Node *new) switch (np->op) { case OMEM: case OAUTO: + *new = *np; return np; case OPTR: return rhs(np->left, new);