diff options
author | Richard Guenther <rguenther@suse.de> | 2007-11-18 15:49:57 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-11-18 15:49:57 +0000 |
commit | 4ba480060a2ab5473b699f57f6f22665c59bff28 (patch) | |
tree | bea728e3c94512d0c37fe270e8f9db54cc513423 /gcc/tree-ssa-forwprop.c | |
parent | 6c4322d7a2577f3d0784845efbebaf4f4025f190 (diff) | |
download | gcc-4ba480060a2ab5473b699f57f6f22665c59bff28.tar.gz |
re PR tree-optimization/34127 (ICE: tree-ssa-operands.c:1688)
2007-11-18 Richard Guenther <rguenther@suse.de>
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
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 661d3d2a240..3e30454ab9f 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)) { |