X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ast2firm.c;h=63bd35030f847acf3f3b1144a8abef6ef5a1b0f2;hb=00fad4c6c28b600fd17a6c3e8320dd6227c28e30;hp=fb3d7347624247ce5d512d049d2b265532e18aee;hpb=877060fa4a4bb34e2b21c184bf5a7aca28f8abae;p=cparser diff --git a/ast2firm.c b/ast2firm.c index fb3d734..63bd350 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -1045,7 +1045,9 @@ static ir_node *wide_string_literal_to_firm( static ir_node *deref_address(ir_type *const irtype, ir_node *const addr, dbg_info *const dbgi) { - if(is_compound_type(irtype) || is_Array_type(irtype)) { + if (is_compound_type(irtype) || + is_Method_type(irtype) || + is_Array_type(irtype)) { return addr; } @@ -1732,8 +1734,12 @@ static ir_node *unary_expression_to_firm(const unary_expression_t *expression) } case EXPR_UNARY_CAST_IMPLICIT: { ir_node *value_node = expression_to_firm(value); - ir_mode *mode = get_ir_mode(type); - return create_conv(dbgi, value_node, mode); + if(is_type_scalar(type)) { + ir_mode *mode = get_ir_mode(type); + return create_conv(dbgi, value_node, mode); + } else { + return value_node; + } } case EXPR_UNARY_ASSUME: if(firm_opt.confirm) @@ -3135,7 +3141,7 @@ static void declaration_statement_to_firm(declaration_statement_t *statement) for( ; declaration != end; declaration = declaration->next) { if(declaration->namespc != NAMESPACE_NORMAL) continue; - create_local_variable(declaration); + create_local_declaration(declaration); } }