scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 76953d9121994abce24da20d6b96587badb93f39
parent d837853fa139f8c35929d1feebee52ba61fdc1d6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 10 Aug 2014 22:52:03 +0200

Fix complex calculation

The sign of the comparision was wrong, because we want the maximum
of the childs.

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

diff --git a/cc2/cgen.c b/cc2/cgen.c @@ -203,7 +203,7 @@ xaddable(Node *np) if (lp) np->complex = lp->complex; if (rp) { - int8_t d = rp->complex - np->complex; + int8_t d = np->complex - rp->complex; if (d == 0) ++np->complex;