OSDN Git Service

PR tree-optimization/49572
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jun 2011 19:32:23 +0000 (19:32 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jun 2011 19:32:23 +0000 (19:32 +0000)
* tree-ssa-dom.c (initialize_hash_element) <GIMPLE_SINGLE_RHS>: Use the
type of the RHS instead of that of the LHS for the expression type.

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

gcc/ChangeLog
gcc/tree-ssa-dom.c

index c343b16..e7b1944 100644 (file)
@@ -1,5 +1,11 @@
 2011-06-30  Eric Botcazou  <ebotcazou@adacore.com>
 
+       PR tree-optimization/49572
+       * tree-ssa-dom.c (initialize_hash_element) <GIMPLE_SINGLE_RHS>: Use the
+       type of the RHS instead of that of the LHS for the expression type.
+
+2011-06-30  Eric Botcazou  <ebotcazou@adacore.com>
+
        * df-scan.c (df_get_entry_block_def_set): Use INCOMING_REGNO macro
        unconditionally.
 
index bbfe0bc..7a00c8a 100644 (file)
@@ -208,13 +208,11 @@ initialize_hash_element (gimple stmt, tree lhs,
     {
       enum tree_code subcode = gimple_assign_rhs_code (stmt);
 
-      expr->type = NULL_TREE;
-
       switch (get_gimple_rhs_class (subcode))
         {
         case GIMPLE_SINGLE_RHS:
          expr->kind = EXPR_SINGLE;
-         expr->type = TREE_TYPE (gimple_assign_lhs (stmt));
+         expr->type = TREE_TYPE (gimple_assign_rhs1 (stmt));
          expr->ops.single.rhs = gimple_assign_rhs1 (stmt);
          break;
         case GIMPLE_UNARY_RHS: