(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
+2008-05-12 Tomas Bily <tbily@suse.cz>
+
+ * 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.
+
2008-05-08 Andreas Schwab <schwab@suse.de>
* utils.c (handle_pure_attribute, init_gigi_decls): Rename
else
return No_Uint;
- case NOP_EXPR: case CONVERT_EXPR: case NON_LVALUE_EXPR:
+ CASE_CONVERT: case NON_LVALUE_EXPR:
return annotate_value (TREE_OPERAND (gnu_size, 0));
/* Now just list the operations we handle. */
if (attribute == Attr_Code_Address)
{
for (gnu_expr = gnu_result;
- TREE_CODE (gnu_expr) == NOP_EXPR
- || TREE_CODE (gnu_expr) == CONVERT_EXPR;
+ CONVERT_EXPR_P (gnu_expr);
gnu_expr = TREE_OPERAND (gnu_expr, 0))
TREE_CONSTANT (gnu_expr) = 1;
else if (TREE_CODE (TREE_TYPE (gnu_prefix)) == FUNCTION_TYPE)
{
for (gnu_expr = gnu_result;
- TREE_CODE (gnu_expr) == NOP_EXPR
- || TREE_CODE (gnu_expr) == CONVERT_EXPR;
+ CONVERT_EXPR_P (gnu_expr);
gnu_expr = TREE_OPERAND (gnu_expr, 0))
;
actually need to protect the address since the data itself can't
change in these situations. */
else if (TREE_CODE (exp) == NON_LVALUE_EXPR
- || TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR
+ || CONVERT_EXPR_P (exp)
|| TREE_CODE (exp) == VIEW_CONVERT_EXPR
|| TREE_CODE (exp) == INDIRECT_REF
|| TREE_CODE (exp) == UNCONSTRAINED_ARRAY_REF)
return ref;
case ADDR_EXPR:
- case NOP_EXPR:
- case CONVERT_EXPR:
+ CASE_CONVERT:
case FLOAT_EXPR:
case FIX_TRUNC_EXPR:
case VIEW_CONVERT_EXPR:
/* Strip off any conversions. */
while (TREE_CODE (offset) == NON_LVALUE_EXPR
- || TREE_CODE (offset) == NOP_EXPR
- || TREE_CODE (offset) == CONVERT_EXPR)
+ || CONVERT_EXPR_P (offset))
offset = TREE_OPERAND (offset, 0);
/* An offset which is a bitwise AND with a negative power of 2
break;
case VIEW_CONVERT_EXPR: case NON_LVALUE_EXPR:
- case NOP_EXPR: case CONVERT_EXPR:
+ CASE_CONVERT:
return remove_conversions (TREE_OPERAND (exp, 0), true_address);
default:
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. */
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:
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))
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))))
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;