From 4ba480060a2ab5473b699f57f6f22665c59bff28 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Sun, 18 Nov 2007 15:49:57 +0000 Subject: re PR tree-optimization/34127 (ICE: tree-ssa-operands.c:1688) 2007-11-18 Richard Guenther PR tree-optimization/34127 * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Make code match up the comments, require compatibility of the pointed-to types. * gcc.c-torture/compile/pr34127.c: New testcase. From-SVN: r130269 --- gcc/tree-ssa-forwprop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree-ssa-forwprop.c') diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 661d3d2..3e30454 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 (TREE_OPERAND (rhs, 0))), - TREE_TYPE (TREE_TYPE (rhs))))) + && types_compatible_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))), + TREE_TYPE (TREE_TYPE (rhs))))) { if (forward_propagate_addr_expr (lhs, rhs)) { -- cgit v1.1