aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/utils2.c
diff options
context:
space:
mode:
authorTomas Bily <tbily@suse.cz>2008-05-12 16:20:35 +0200
committerTomas Bily <tomby@gcc.gnu.org>2008-05-12 16:20:35 +0200
commit751d1520c31199d7a67e8c3caaed4e4af90fcb75 (patch)
tree4f9197dd372e807b35158d95c6870719d2c538c5 /gcc/ada/utils2.c
parent63a906f02b620920f146512e2c5572b2ae5314f8 (diff)
downloadgcc-751d1520c31199d7a67e8c3caaed4e4af90fcb75.zip
gcc-751d1520c31199d7a67e8c3caaed4e4af90fcb75.tar.gz
gcc-751d1520c31199d7a67e8c3caaed4e4af90fcb75.tar.bz2
* utils2.c (known_alignment, contains_save_expr_p)
(gnat_mark_addressable): Use CASE_CONVERT. * decl.c (annotate_value): Likewise. * trans.c (maybe_stabilize_reference): Likewise. * utils2.c (build_binary_op): Use CONVERT_EXPR_P. * utils.c (rest_of_record_type_compilation): Likewise. * trans.c (protect_multiple_eval, Attribute_to_gnu) (protect_multiple_eval): Likewise. From-SVN: r135215
Diffstat (limited to 'gcc/ada/utils2.c')
-rw-r--r--gcc/ada/utils2.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index b45c7ac..891463c 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -156,9 +156,8 @@ known_alignment (tree exp)
switch (TREE_CODE (exp))
{
- case CONVERT_EXPR:
+ CASE_CONVERT:
case VIEW_CONVERT_EXPR:
- case NOP_EXPR:
case NON_LVALUE_EXPR:
/* Conversions between pointers and integers don't change the alignment
of the underlying object. */
@@ -293,7 +292,7 @@ contains_save_expr_p (tree exp)
case ADDR_EXPR: case INDIRECT_REF:
case COMPONENT_REF:
- case NOP_EXPR: case CONVERT_EXPR: case VIEW_CONVERT_EXPR:
+ CASE_CONVERT: case VIEW_CONVERT_EXPR:
return contains_save_expr_p (TREE_OPERAND (exp, 0));
case CONSTRUCTOR:
@@ -659,8 +658,7 @@ build_binary_op (enum tree_code op_code, tree result_type,
conversions between array and record types, except for justified
modular types. But don't do this if the right operand is not
BLKmode (for packed arrays) unless we are not changing the mode. */
- while ((TREE_CODE (left_operand) == CONVERT_EXPR
- || TREE_CODE (left_operand) == NOP_EXPR
+ while ((CONVERT_EXPR_P (left_operand)
|| TREE_CODE (left_operand) == VIEW_CONVERT_EXPR)
&& (((INTEGRAL_TYPE_P (left_type)
|| POINTER_TYPE_P (left_type))
@@ -742,8 +740,7 @@ build_binary_op (enum tree_code op_code, tree result_type,
result = TREE_OPERAND (result, 0);
else if (TREE_CODE (result) == REALPART_EXPR
|| TREE_CODE (result) == IMAGPART_EXPR
- || ((TREE_CODE (result) == NOP_EXPR
- || TREE_CODE (result) == CONVERT_EXPR)
+ || (CONVERT_EXPR_P (result)
&& (((TREE_CODE (restype)
== TREE_CODE (TREE_TYPE
(TREE_OPERAND (result, 0))))
@@ -2190,9 +2187,8 @@ gnat_mark_addressable (tree expr_node)
case REALPART_EXPR:
case IMAGPART_EXPR:
case VIEW_CONVERT_EXPR:
- case CONVERT_EXPR:
case NON_LVALUE_EXPR:
- case NOP_EXPR:
+ CASE_CONVERT:
expr_node = TREE_OPERAND (expr_node, 0);
break;