* tree-cfg.c (verify_expr): Check for NON_LVALUE_EXPR as
authortomby <tomby@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Apr 2008 12:50:17 +0000 (12:50 +0000)
committertomby <tomby@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Apr 2008 12:50:17 +0000 (12:50 +0000)
        unreachable case.

        * tree-vrp.c (extract_range_from_unary_expr): Removed unused
        NON_LVALUE_EXPR.

        * tree-ssa-threadedge.c (simplify_control_stmt_condition):
        Likewise.

        * tree-ssa-structalias.c (get_constraint_for): Likewise.

        * tree-inline.c (estimate_num_insns_1): Likewise.

        * varasm.c (const_hash_1, compare_constant, copy_constant)
        (compute_reloc_for_constant, output_addressed_constants):
        Likewise.

        * emit-rtl.c (component_ref_for_mem_expr)
        (set_mem_attributes_minus_bitpos): Likewise.

        * expr.c (highest_pow2_factor, expand_expr_real_1, )
        (is_aligning_offset): Likewise.

        * dwarf2out.c (loc_descriptor_from_tree_1, add_bound_info):
        Likewise.

        * tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): Likewise.

        * dojump.c (do_jump): Likewise.

        * builtins.c (get_pointer_alignment, get_memory_rtx)
        (integer_valued_real_p, fold_builtin_next_arg): Likewise.

        * tree-scalar-evolution.c (instantiate_parameters_1): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134591 138bc75d-0d04-0410-961f-82ee72b054a4

13 files changed:
gcc/builtins.c
gcc/dojump.c
gcc/dwarf2out.c
gcc/emit-rtl.c
gcc/expr.c
gcc/tree-cfg.c
gcc/tree-inline.c
gcc/tree-scalar-evolution.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-structalias.c
gcc/tree-ssa-threadedge.c
gcc/tree-vrp.c
gcc/varasm.c

index 761a658..06ecb24 100644 (file)
@@ -281,7 +281,6 @@ get_pointer_alignment (tree exp, unsigned int max_align)
        {
        case NOP_EXPR:
        case CONVERT_EXPR:
-       case NON_LVALUE_EXPR:
          exp = TREE_OPERAND (exp, 0);
          if (! POINTER_TYPE_P (TREE_TYPE (exp)))
            return align;
@@ -1073,8 +1072,7 @@ get_memory_rtx (tree exp, tree len)
   /* Get an expression we can use to find the attributes to assign to MEM.
      If it is an ADDR_EXPR, use the operand.  Otherwise, dereference it if
      we can.  First remove any nops.  */
-  while ((TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR
-         || TREE_CODE (exp) == NON_LVALUE_EXPR)
+  while ((TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR)
         && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0))))
     exp = TREE_OPERAND (exp, 0);
 
@@ -1106,7 +1104,6 @@ get_memory_rtx (tree exp, tree len)
          while (TREE_CODE (inner) == ARRAY_REF
                 || TREE_CODE (inner) == NOP_EXPR
                 || TREE_CODE (inner) == CONVERT_EXPR
-                || TREE_CODE (inner) == NON_LVALUE_EXPR
                 || TREE_CODE (inner) == VIEW_CONVERT_EXPR
                 || TREE_CODE (inner) == SAVE_EXPR)
            inner = TREE_OPERAND (inner, 0);
@@ -7265,7 +7262,6 @@ integer_valued_real_p (tree t)
 
     case ABS_EXPR:
     case SAVE_EXPR:
-    case NON_LVALUE_EXPR:
       return integer_valued_real_p (TREE_OPERAND (t, 0));
 
     case COMPOUND_EXPR:
@@ -11435,7 +11431,6 @@ fold_builtin_next_arg (tree exp, bool va_start_p)
         parameters.  */
       while (TREE_CODE (arg) == NOP_EXPR
             || TREE_CODE (arg) == CONVERT_EXPR
-            || TREE_CODE (arg) == NON_LVALUE_EXPR
             || TREE_CODE (arg) == INDIRECT_REF)
        arg = TREE_OPERAND (arg, 0);
       if (arg != last_parm)
index b619e0f..e7afb7e 100644 (file)
@@ -219,8 +219,7 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
 
          /* Strip narrowing integral type conversions.  */
          while ((TREE_CODE (exp0) == NOP_EXPR
-                 || TREE_CODE (exp0) == CONVERT_EXPR
-                 || TREE_CODE (exp0) == NON_LVALUE_EXPR)
+                 || TREE_CODE (exp0) == CONVERT_EXPR)
                 && TREE_OPERAND (exp0, 0) != error_mark_node
                 && TYPE_PRECISION (TREE_TYPE (exp0))
                    <= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (exp0, 0))))
index 49c13d2..2c7f318 100644 (file)
@@ -9583,7 +9583,6 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
     case VIEW_CONVERT_EXPR:
     case SAVE_EXPR:
     case GIMPLE_MODIFY_STMT:
@@ -11212,7 +11211,6 @@ add_bound_info (dw_die_ref subrange_die, enum dwarf_attribute bound_attr, tree b
 
     case CONVERT_EXPR:
     case NOP_EXPR:
-    case NON_LVALUE_EXPR:
     case VIEW_CONVERT_EXPR:
       add_bound_info (subrange_die, bound_attr, TREE_OPERAND (bound, 0));
       break;
index aa9e965..b8b19d6 100644 (file)
@@ -1432,7 +1432,6 @@ component_ref_for_mem_expr (tree ref)
       /* Now remove any conversions: they don't change what the underlying
         object is.  Likewise for SAVE_EXPR.  */
       while (TREE_CODE (inner) == NOP_EXPR || TREE_CODE (inner) == CONVERT_EXPR
-            || TREE_CODE (inner) == NON_LVALUE_EXPR
             || TREE_CODE (inner) == VIEW_CONVERT_EXPR
             || TREE_CODE (inner) == SAVE_EXPR)
        inner = TREE_OPERAND (inner, 0);
@@ -1563,7 +1562,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
       /* Now remove any conversions: they don't change what the underlying
         object is.  Likewise for SAVE_EXPR.  */
       while (TREE_CODE (t) == NOP_EXPR || TREE_CODE (t) == CONVERT_EXPR
-            || TREE_CODE (t) == NON_LVALUE_EXPR
             || TREE_CODE (t) == VIEW_CONVERT_EXPR
             || TREE_CODE (t) == SAVE_EXPR)
        t = TREE_OPERAND (t, 0);
index 7f38643..1bb3d82 100644 (file)
@@ -6599,7 +6599,7 @@ highest_pow2_factor (const_tree exp)
        }
       break;
 
-    case NON_LVALUE_EXPR:  case NOP_EXPR:  case CONVERT_EXPR:
+    case NOP_EXPR:  case CONVERT_EXPR:
     case SAVE_EXPR:
       return highest_pow2_factor (TREE_OPERAND (exp, 0));
 
@@ -7121,9 +7121,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
     }
 
   ignore = (target == const0_rtx
-           || ((code == NON_LVALUE_EXPR || code == NOP_EXPR
-                || code == CONVERT_EXPR || code == COND_EXPR
-                || code == VIEW_CONVERT_EXPR)
+           || ((code == NOP_EXPR || code == CONVERT_EXPR 
+                || code == COND_EXPR || code == VIEW_CONVERT_EXPR)
                && TREE_CODE (type) == VOID_TYPE));
 
   /* An operation in what may be a bit-field type needs the
@@ -8018,7 +8017,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
       return expand_call (exp, target, ignore);
 
     case PAREN_EXPR:
-    case NON_LVALUE_EXPR:
     case NOP_EXPR:
     case CONVERT_EXPR:
       if (TREE_OPERAND (exp, 0) == error_mark_node)
@@ -9411,8 +9409,7 @@ static int
 is_aligning_offset (const_tree offset, const_tree exp)
 {
   /* Strip off any conversions.  */
-  while (TREE_CODE (offset) == NON_LVALUE_EXPR
-        || TREE_CODE (offset) == NOP_EXPR
+  while (TREE_CODE (offset) == NOP_EXPR
         || TREE_CODE (offset) == CONVERT_EXPR)
     offset = TREE_OPERAND (offset, 0);
 
@@ -9428,8 +9425,7 @@ is_aligning_offset (const_tree offset, const_tree exp)
   /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
      It must be NEGATE_EXPR.  Then strip any more conversions.  */
   offset = TREE_OPERAND (offset, 0);
-  while (TREE_CODE (offset) == NON_LVALUE_EXPR
-        || TREE_CODE (offset) == NOP_EXPR
+  while (TREE_CODE (offset) == NOP_EXPR
         || TREE_CODE (offset) == CONVERT_EXPR)
     offset = TREE_OPERAND (offset, 0);
 
@@ -9437,8 +9433,7 @@ is_aligning_offset (const_tree offset, const_tree exp)
     return 0;
 
   offset = TREE_OPERAND (offset, 0);
-  while (TREE_CODE (offset) == NON_LVALUE_EXPR
-        || TREE_CODE (offset) == NOP_EXPR
+  while (TREE_CODE (offset) == NOP_EXPR
         || TREE_CODE (offset) == CONVERT_EXPR)
     offset = TREE_OPERAND (offset, 0);
 
index f63f6eb..4ab192d 100644 (file)
@@ -3254,6 +3254,9 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
        }
       break;
 
+    case NON_LVALUE_EXPR:
+       gcc_unreachable ();
+
     case NOP_EXPR:
     case CONVERT_EXPR:
     case FIX_TRUNC_EXPR:
@@ -3261,7 +3264,6 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
     case NEGATE_EXPR:
     case ABS_EXPR:
     case BIT_NOT_EXPR:
-    case NON_LVALUE_EXPR:
     case TRUTH_NOT_EXPR:
       CHECK_OP (0, "invalid operand to unary operator");
       break;
index 6658199..687ed95 100644 (file)
@@ -2233,7 +2233,6 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
     case EH_FILTER_EXPR:
     case STATEMENT_LIST:
     case ERROR_MARK:
-    case NON_LVALUE_EXPR:
     case FDESC_EXPR:
     case VA_ARG_EXPR:
     case TRY_CATCH_EXPR:
index 29f0dcf..31b7768 100644 (file)
@@ -2117,7 +2117,6 @@ instantiate_parameters_1 (struct loop *loop, tree chrec, int flags, htab_t cache
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
       op0 = instantiate_parameters_1 (loop, TREE_OPERAND (chrec, 0),
                                      flags, cache, size_expr);
       if (op0 == chrec_dont_know)
index 93f3be6..0687e89 100644 (file)
@@ -1541,7 +1541,6 @@ may_be_nonaddressable_p (tree expr)
       return may_be_nonaddressable_p (TREE_OPERAND (expr, 0));
 
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
     case NOP_EXPR:
       return true;
 
index 6f6eff4..5323a2b 100644 (file)
@@ -2913,7 +2913,6 @@ get_constraint_for (tree t, VEC (ce_s, heap) **results)
          {
          case NOP_EXPR:
          case CONVERT_EXPR:
-         case NON_LVALUE_EXPR:
            {
              tree op = TREE_OPERAND (t, 0);
 
index 9e7dd6e..d0d8fb2 100644 (file)
@@ -429,8 +429,7 @@ simplify_control_stmt_condition (edge e,
 
       cached_lhs = fold (COND_EXPR_COND (dummy_cond));
       while (TREE_CODE (cached_lhs) == NOP_EXPR
-            || TREE_CODE (cached_lhs) == CONVERT_EXPR
-            || TREE_CODE (cached_lhs) == NON_LVALUE_EXPR)
+            || TREE_CODE (cached_lhs) == CONVERT_EXPR)
        cached_lhs = TREE_OPERAND (cached_lhs, 0);
 
       fold_undefer_overflow_warnings (is_gimple_min_invariant (cached_lhs),
index e9106c4..95f2a52 100644 (file)
@@ -2292,7 +2292,6 @@ extract_range_from_unary_expr (value_range_t *vr, enum tree_code code,
   if (code == FIX_TRUNC_EXPR
       || code == FLOAT_EXPR
       || code == BIT_NOT_EXPR
-      || code == NON_LVALUE_EXPR
       || code == CONJ_EXPR)
     {
       set_value_range_to_varying (vr);
@@ -3957,8 +3956,7 @@ register_edge_assert_for_1 (tree op, enum tree_code code,
       retval |= register_edge_assert_for_1 (rhs, code, e, bsi);
     }
   else if (TREE_CODE (rhs) == NOP_EXPR
-          || TREE_CODE (rhs) == CONVERT_EXPR
-          || TREE_CODE (rhs) == NON_LVALUE_EXPR)
+          || TREE_CODE (rhs) == CONVERT_EXPR)
     { 
       /* Recurse through the type conversion.  */
       retval |= register_edge_assert_for_1 (TREE_OPERAND (rhs, 0),
index bfdf367..518fe8a 100644 (file)
@@ -2815,7 +2815,6 @@ const_hash_1 (const tree exp)
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
       return const_hash_1 (TREE_OPERAND (exp, 0)) * 7 + 2;
 
     default:
@@ -2970,7 +2969,6 @@ compare_constant (const tree t1, const tree t2)
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
     case VIEW_CONVERT_EXPR:
       return compare_constant (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
 
@@ -3018,7 +3016,6 @@ copy_constant (tree exp)
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
     case VIEW_CONVERT_EXPR:
       return build1 (TREE_CODE (exp), TREE_TYPE (exp),
                     copy_constant (TREE_OPERAND (exp, 0)));
@@ -3917,7 +3914,6 @@ compute_reloc_for_constant (tree exp)
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
     case VIEW_CONVERT_EXPR:
       reloc = compute_reloc_for_constant (TREE_OPERAND (exp, 0));
       break;
@@ -3973,7 +3969,6 @@ output_addressed_constants (tree exp)
 
     case NOP_EXPR:
     case CONVERT_EXPR:
-    case NON_LVALUE_EXPR:
     case VIEW_CONVERT_EXPR:
       output_addressed_constants (TREE_OPERAND (exp, 0));
       break;