scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit c72e4d06d0b6510f3dbb0ea05a15e83b0696262b
parent dd69378b91c35a62d9e2960fbad9ae11e4a06ec4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 27 Sep 2016 17:06:46 +0200

[cc2-qbe] Fix default case in bool()

We were generating code for the left child of the parameter,
but we had to generate the code for the node itself.

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

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -362,7 +362,7 @@ bool(Node *np, Symbol *true, Symbol *false) default: label2node(&ifyes, true); label2node(&ifno, false); - code(ASBRANCH, rhs(l, &ret), &ifyes, &ifno); + code(ASBRANCH, rhs(np, &ret), &ifyes, &ifno); break; } }