summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-11-16 13:14:03 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-11-16 13:14:03 +0000
commit99552e406c4175a2d700149758ba8c6c70d400f2 (patch)
tree97750d67d6f8abd3fbd25accee31cb3d8df964c2 /gcc/tree-ssa-forwprop.c
parent7f879c9615a980c3874350e9739bce139c67f322 (diff)
downloadgcc-99552e406c4175a2d700149758ba8c6c70d400f2.tar.gz
re PR tree-optimization/34113 (ICE in get_addr_dereference_operands, at tree-ssa-operands.c:1746)
2007-11-16 Richard Guenther <rguenther@suse.de> PR tree-optimization/34113 * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Use correct conversion direction for checking type compatibility. * gcc.c-torture/compile/pr34113.c: New testcase. From-SVN: r130223
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index bacd34e7f4d..661d3d2a240 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -959,8 +959,8 @@ tree_ssa_forward_propagate_single_use_vars (void)
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (rhs))
- && useless_type_conversion_p (TREE_TYPE (TREE_TYPE (rhs)),
- TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))))))
+ && useless_type_conversion_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))),
+ TREE_TYPE (TREE_TYPE (rhs)))))
{
if (forward_propagate_addr_expr (lhs, rhs))
{