From: Eric Botcazou Date: Thu, 30 Jun 2011 19:39:41 +0000 (+0000) Subject: re PR tree-optimization/49572 (gcc.dg/tree-ssa/20030709-2.c scan-tree-dump-times... X-Git-Tag: releases/gcc-4.4.7~340 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cfdffb3e0d16f092b1ce26da84660425ef76ada;p=thirdparty%2Fgcc.git re PR tree-optimization/49572 (gcc.dg/tree-ssa/20030709-2.c scan-tree-dump-times cddce2 ".rtmem" 0) PR tree-optimization/49572 * tree-ssa-dom.c (initialize_hash_element) : Use the type of the RHS instead of that of the LHS for the expression type. From-SVN: r175724 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e164ed90ce90..fb7d2153c20e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-30 Eric Botcazou + + PR tree-optimization/49572 + * tree-ssa-dom.c (initialize_hash_element) : Use the + type of the RHS instead of that of the LHS for the expression type. + 2011-06-28 Eric Botcazou * tree-ssa-dom.c (initialize_hash_element): Fix oversight. diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 6b080383532d..6a34bda9ffe2 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -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: