OSDN Git Service

* common.opt (fshow-column): Default to 0.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-sccvn.c
index bca0e84..b4fb014 100644 (file)
@@ -1022,6 +1022,11 @@ set_ssa_val_to (tree from, tree to)
 {
   tree currval;
 
+  if (from != to
+      && TREE_CODE (to) == SSA_NAME
+      && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to))
+    to = from;
+
   /* The only thing we allow as value numbers are VN_TOP, ssa_names
      and invariants.  So assert that here.  */
   gcc_assert (to != NULL_TREE
@@ -1385,7 +1390,7 @@ valueize_expr (tree expr)
    simplified. */
 
 static tree
-simplify_binary_expression (tree rhs)
+simplify_binary_expression (tree stmt, tree rhs)
 {
   tree result = NULL_TREE;
   tree op0 = TREE_OPERAND (rhs, 0);
@@ -1416,8 +1421,13 @@ simplify_binary_expression (tree rhs)
       && op1 == TREE_OPERAND (rhs, 1))
     return NULL_TREE;
 
+  fold_defer_overflow_warnings ();
+
   result = fold_binary (TREE_CODE (rhs), TREE_TYPE (rhs), op0, op1);
 
+  fold_undefer_overflow_warnings (result && valid_gimple_expression_p (result),
+                                 stmt, 0);
+
   /* Make sure result is not a complex expression consisting
      of operators of operators (IE (a + b) + (a + c))
      Otherwise, we will end up with unbounded expressions if
@@ -1517,7 +1527,7 @@ try_to_simplify (tree stmt, tree rhs)
          break;
        case tcc_comparison:
        case tcc_binary:
-         return simplify_binary_expression (rhs);
+         return simplify_binary_expression (stmt, rhs);
          break;
        default:
          break;