scc

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

commit e961b8c2e12cb80e69a698f14516601aca4cb016
parent f66f017585239582175ccc52b9c110a90f60f07b
Author: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
Date:   Fri, 22 Apr 2016 22:00:15 +0200

[cc2-qbe] Fix allocation of parameters

The test was inverted and it meant that we were allocating
the temporaries instead of the parameters.

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

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c @@ -313,7 +313,7 @@ writeout(void) puts(")\n{"); /* allocate stack space for parameters */ - for (p = locals; p && (p->type.flags & PARF) == 0; p = p->next) + for (p = locals; p && (p->type.flags & PARF) != 0; p = p->next) alloc(p); /* allocate stack space for local variables) */