diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-09-25 20:15:10 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-09-25 20:15:10 +0000 |
commit | dee12fcd11764d3a1c2f5f6f8d00a2b17f1119ec (patch) | |
tree | 135262bbdf17968f20151428c4863f4df55757d0 /gcc/ada/gcc-interface/utils2.c | |
parent | dea976c48066580dff56c1055027d7398072bfc9 (diff) | |
download | gcc-dee12fcd11764d3a1c2f5f6f8d00a2b17f1119ec.zip gcc-dee12fcd11764d3a1c2f5f6f8d00a2b17f1119ec.tar.gz gcc-dee12fcd11764d3a1c2f5f6f8d00a2b17f1119ec.tar.bz2 |
decl.c (gnat_to_gnu_entity): Use XNEW instead of xmalloc.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
XNEW instead of xmalloc. Do not build useless pointer type.
<E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
* gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
* gcc-interface/utils2.c (build_unary_op): Remove local variable.
From-SVN: r179168
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 87cb269..0849508 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -1000,7 +1000,6 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) tree base_type = get_base_type (type); tree operation_type = result_type; tree result; - bool side_effects = false; if (operation_type && TREE_CODE (operation_type) == RECORD_TYPE @@ -1235,8 +1234,12 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) TREE_READONLY (result) = TYPE_READONLY (TREE_TYPE (type)); } - side_effects - = (!TYPE_IS_FAT_POINTER_P (type) && TYPE_VOLATILE (TREE_TYPE (type))); + if (!TYPE_IS_FAT_POINTER_P (type) && TYPE_VOLATILE (TREE_TYPE (type))) + { + TREE_SIDE_EFFECTS (result) = 1; + if (TREE_CODE (result) == INDIRECT_REF) + TREE_THIS_VOLATILE (result) = TYPE_VOLATILE (TREE_TYPE (result)); + } break; case NEGATE_EXPR: @@ -1322,13 +1325,6 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) convert (operation_type, operand)); } - if (side_effects) - { - TREE_SIDE_EFFECTS (result) = 1; - if (TREE_CODE (result) == INDIRECT_REF) - TREE_THIS_VOLATILE (result) = TYPE_VOLATILE (TREE_TYPE (result)); - } - if (result_type && TREE_TYPE (result) != result_type) result = convert (result_type, result); |