[hackers] [scc] [cc2-qbe] Fix the type in alloc assignation || Roberto E. Vargas Caballero
commit 3af0039562d8ff0baaddc57d9caa36fe10b2ba16
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Jun 2 08:31:12 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Jun 2 08:31:12 2016 +0200
[cc2-qbe] Fix the type in alloc assignation
The type in this assignation is not the type of the base code,
it is the type of the pointer in the current architecture,
that in our case is the type ptrtype.
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 6e23894..62c78e9 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -295,9 +295,10 @@ static void
alloc(Symbol *sym)
{
Type *tp = &sym->type;
+ extern Type ptrtype;
printf("\t%s =%s\talloc%lu\t%lu\n",
- symname(sym), size2asm(tp), tp->size, tp->align);
+ symname(sym), size2asm(&ptrtype), tp->size, tp->align);
}
void
Received on Thu Jun 02 2016 - 08:35:26 CEST
This archive was generated by hypermail 2.3.0
: Thu Jun 02 2016 - 08:36:17 CEST