]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/49572 (gcc.dg/tree-ssa/20030709-2.c scan-tree-dump-times...
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 30 Jun 2011 19:39:41 +0000 (19:39 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 30 Jun 2011 19:39:41 +0000 (19:39 +0000)
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.

From-SVN: r175724

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

index e164ed90ce905d8cf3323f2c7ff72512ed2b282f..fb7d2153c20ec142e7d5160356e4c8a2757975eb 100644 (file)
@@ -1,3 +1,9 @@
+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-28  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree-ssa-dom.c (initialize_hash_element): Fix oversight.
index 6b080383532dfbd19d4e97fcc063b7e24291c6d0..6a34bda9ffe2db6dd8c4d5901b635a80731d6a30 100644 (file)
@@ -225,13 +225,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: