diff options
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); |