tree.def (REALPART_EXPR, [...]): Move.
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 19 Mar 2012 15:35:55 +0000 (15:35 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 19 Mar 2012 15:35:55 +0000 (15:35 +0000)
* tree.def (REALPART_EXPR, IMAGPART_EXPR, VIEW_CONVERT_EXPR): Move.
* tree.h (handled_component_p): Reorder cases.
* dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref): Do
not initialize unsignedp.
(loc_list_from_tree): Likewise.
(fortran_common): Likewise.
* simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.

From-SVN: r185522

gcc/ChangeLog
gcc/dwarf2out.c
gcc/simplify-rtx.c
gcc/tree.def
gcc/tree.h

index 477fbc00dc2b2c04c222555470111f9082f3d0d0..670361eb04af19cd4d441f6d389e5730ebd71ddc 100644 (file)
@@ -1,3 +1,13 @@
+2012-03-19  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree.def (REALPART_EXPR, IMAGPART_EXPR, VIEW_CONVERT_EXPR): Move.
+       * tree.h (handled_component_p): Reorder cases.
+       * dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref): Do
+       not initialize unsignedp.
+       (loc_list_from_tree): Likewise.
+       (fortran_common): Likewise.
+       * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
+
 2012-03-19  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (ix86_expand_prologue) <CM_LARGE_PIC>: Use Pmode
@@ -32,7 +42,7 @@
 
 2012-03-16  Martin Jambor  <mjambor@suse.cz>
 
-       * expr.c (expand_expr_real_1): handle misaligned scalar reads from
+       * expr.c (expand_expr_real_1): Handle misaligned scalar reads from
        memory through MEM_REFs by calling extract_bit_field.
 
 2012-03-16  Richard Guenther  <rguenther@suse.de>
index 264edd7ceac49324a9fb2d4f985344e4909656fe..828e996edb4cccaf21aed6e2a102df32fac096b4 100644 (file)
@@ -13328,8 +13328,8 @@ cst_pool_loc_descr (tree loc)
 }
 
 /* Return dw_loc_list representing address of addr_expr LOC
-   by looking for innder INDIRECT_REF expression and turing it
-   into simple arithmetics.  */
+   by looking for inner INDIRECT_REF expression and turning
+   it into simple arithmetics.  */
 
 static dw_loc_list_ref
 loc_list_for_address_of_addr_expr_of_indirect_ref (tree loc, bool toplev)
@@ -13337,8 +13337,7 @@ loc_list_for_address_of_addr_expr_of_indirect_ref (tree loc, bool toplev)
   tree obj, offset;
   HOST_WIDE_INT bitsize, bitpos, bytepos;
   enum machine_mode mode;
-  int volatilep;
-  int unsignedp = TYPE_UNSIGNED (TREE_TYPE (loc));
+  int unsignedp, volatilep = 0;
   dw_loc_list_ref list_ret = NULL, list_ret1 = NULL;
 
   obj = get_inner_reference (TREE_OPERAND (loc, 0),
@@ -13628,8 +13627,7 @@ loc_list_from_tree (tree loc, int want_address)
        tree obj, offset;
        HOST_WIDE_INT bitsize, bitpos, bytepos;
        enum machine_mode mode;
-       int volatilep;
-       int unsignedp = TYPE_UNSIGNED (TREE_TYPE (loc));
+       int unsignedp, volatilep = 0;
 
        obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
                                   &unsignedp, &volatilep, false);
@@ -14927,7 +14925,7 @@ fortran_common (tree decl, HOST_WIDE_INT *value)
   enum machine_mode mode;
   HOST_WIDE_INT bitsize, bitpos;
   tree offset;
-  int volatilep = 0, unsignedp = 0;
+  int unsignedp, volatilep = 0;
 
   /* If the decl isn't a VAR_DECL, or if it isn't static, or if
      it does not have a value (the offset into the common area), or if it
index bba565ddfd39f76e442cbdc8cbad7ced6e1b8c6f..35b7f2cdd2980bbcc063c2e31cd9035b0256d8ea 100644 (file)
@@ -293,7 +293,7 @@ delegitimize_mem_from_attrs (rtx x)
          {
            HOST_WIDE_INT bitsize, bitpos;
            tree toffset;
-           int unsignedp = 0, volatilep = 0;
+           int unsignedp, volatilep = 0;
 
            decl = get_inner_reference (decl, &bitsize, &bitpos, &toffset,
                                        &mode, &unsignedp, &volatilep, false);
index a30724913880a2c638a531778d154a8a824cf5b4..fd7cbbd12653f3ba869bcfde3e594946f76bd1f2 100644 (file)
@@ -400,11 +400,6 @@ DEFTREECODE (COMPONENT_REF, "component_ref", tcc_reference, 3)
    to its mode width.  */
 DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", tcc_reference, 3)
 
-/* Used only on an operand of complex type, these return
-   a value of the corresponding component type.  */
-DEFTREECODE (REALPART_EXPR, "realpart_expr", tcc_reference, 1)
-DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", tcc_reference, 1)
-
 /* Array indexing.
    Operand 0 is the array; operand 1 is a (single) array index.
    Operand 2, if present, is a copy of TYPE_MIN_VALUE of the index.
@@ -417,6 +412,23 @@ DEFTREECODE (ARRAY_REF, "array_ref", tcc_reference, 4)
    of the range is taken from the type of the expression.  */
 DEFTREECODE (ARRAY_RANGE_REF, "array_range_ref", tcc_reference, 4)
 
+/* Used only on an operand of complex type, these return
+   a value of the corresponding component type.  */
+DEFTREECODE (REALPART_EXPR, "realpart_expr", tcc_reference, 1)
+DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", tcc_reference, 1)
+
+/* Represents viewing something of one type as being of a second type.
+   This corresponds to an "Unchecked Conversion" in Ada and roughly to
+   the idiom *(type2 *)&X in C.  The only operand is the value to be
+   viewed as being of another type.  It is undefined if the type of the
+   input and of the expression have different sizes.
+
+   This code may also be used within the LHS of a MODIFY_EXPR, in which
+   case no actual data motion may occur.  TREE_ADDRESSABLE will be set in
+   this case and GCC must abort if it could not do the operation without
+   generating insns.  */
+DEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
+
 /* C unary `*' or Pascal `^'.  One operand, an expression for a pointer.  */
 DEFTREECODE (INDIRECT_REF, "indirect_ref", tcc_reference, 1)
 
@@ -769,18 +781,6 @@ DEFTREECODE (NOP_EXPR, "nop_expr", tcc_unary, 1)
 /* Value is same as argument, but guaranteed not an lvalue.  */
 DEFTREECODE (NON_LVALUE_EXPR, "non_lvalue_expr", tcc_unary, 1)
 
-/* Represents viewing something of one type as being of a second type.
-   This corresponds to an "Unchecked Conversion" in Ada and roughly to
-   the idiom *(type2 *)&X in C.  The only operand is the value to be
-   viewed as being of another type.  It is undefined if the type of the
-   input and of the expression have different sizes.
-
-   This code may also be used within the LHS of a MODIFY_EXPR, in which
-   case no actual data motion may occur.  TREE_ADDRESSABLE will be set in
-   this case and GCC must abort if it could not do the operation without
-   generating insns.  */
-DEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
-
 /* A COMPOUND_LITERAL_EXPR represents a literal that is placed in a DECL.  The
    COMPOUND_LITERAL_EXPR_DECL_EXPR is the a DECL_EXPR containing the decl
    for the anonymous object represented by the COMPOUND_LITERAL;
index c0340aafd39f979fb9ded70a54cf98b8921a23f4..8a1cbb80c236f084d6eaf4cbeb7b3f3807963cb8 100644 (file)
@@ -5029,13 +5029,13 @@ handled_component_p (const_tree t)
 {
   switch (TREE_CODE (t))
     {
-    case BIT_FIELD_REF:
     case COMPONENT_REF:
+    case BIT_FIELD_REF:
     case ARRAY_REF:
     case ARRAY_RANGE_REF:
-    case VIEW_CONVERT_EXPR:
     case REALPART_EXPR:
     case IMAGPART_EXPR:
+    case VIEW_CONVERT_EXPR:
       return true;
 
     default: