ref: a0cfc89f2d6edb0f059c14000adab63913efce29
parent: 6f385b9586ba41aa1d8ba52622bd4792c36453f6
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Sep 3 13:53:23 EDT 2015
Fix type in constant and var nodes The type of these nodes depende of the symbol passed as parameter, but the code was not updating the type, so it is needed copy the type from the symbol to the node.
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -411,6 +411,7 @@
Node *np;
np = node(OSYM, sym->type, NULL, NULL);
+ np->type = sym->type;
np->lvalue = 1;
np->constant = 0;
np->symbol = 1;
@@ -424,6 +425,7 @@
Node *np;
np = node(OSYM, sym->type, NULL, NULL);
+ np->type = sym->type;
np->symbol = 1;
np->constant = 1;
np->sym = sym;