ast2firm: Use the value returned by set_value_for_expression_addr() as return value...
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 9 Dec 2012 09:50:49 +0000 (10:50 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 9 Dec 2012 17:45:00 +0000 (18:45 +0100)
- This is important for bitfields, which contain fewer bits than the to be stored value has.
- This is important for float variables, when the calculation is done in higher precision.

ast2firm.c

index 74367c6..4389b53 100644 (file)
@@ -2108,8 +2108,8 @@ static ir_node *create_incdec(unary_expression_t const *const expr, bool const i
                ? new_d_Add(dbgi, value, offset, mode)
                : new_d_Sub(dbgi, value, offset, mode);
 
-       set_value_for_expression_addr(value_expr, new_value, addr);
-       return pre ? new_value : value;
+       ir_node *const store_value = set_value_for_expression_addr(value_expr, new_value, addr);
+       return pre ? store_value : value;
 }
 
 static bool is_local_variable(expression_t *expression)