From: Christoph Mallon Date: Sat, 17 Nov 2007 16:35:53 +0000 (+0000) Subject: Handle IR generation for access to global variables of compound type. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=3a5157cdfa79c99b5129bebc30741c3d0bef8e28;p=cparser Handle IR generation for access to global variables of compound type. [r18447] --- diff --git a/ast2firm.c b/ast2firm.c index 47a0010..f98e0a7 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -651,12 +651,7 @@ static ir_node *reference_expression_to_firm(const reference_expression_t *ref) case DECLARATION_TYPE_GLOBAL_VARIABLE: { ir_entity *entity = declaration->v.entity; ir_node *symconst = create_symconst(dbgi, entity); - - if(type->type == TYPE_ARRAY) { - return symconst; - } else { - return load_from_expression_addr(type, symconst, dbgi); - } + return deref_address(type, symconst, dbgi); } case DECLARATION_TYPE_LOCAL_VARIABLE_ENTITY: { ir_entity *entity = declaration->v.entity;