This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] tree-ssa-ccp.c: PR tree-optimization/20936.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dave dot anglin at nrc-cnrc dot gc dot ca, uweigand at de dot ibm dot com, dnovillo at redhat dot com
- Date: Fri, 15 Apr 2005 10:05:23 -0400 (EDT)
- Subject: [patch] tree-ssa-ccp.c: PR tree-optimization/20936.
Hi,
Attached is a patch to fix PR tree-optimization/20936.
orig_lhs is known to be a VIEW_CONVERT_EXPR, which takes only one
operand, so accessing TREE_OPERAND (orig_lhs, 1) leads to crash.
Tested on i686-pc-linux-gnu. Committed as obvious.
Kazu Hirata
2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
PR tree-optimization/20936.
* tree-ssa-ccp.c (visit_assignment): Fix a typo.
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-ccp.c,v
retrieving revision 2.64
diff -u -d -p -r2.64 tree-ssa-ccp.c
--- tree-ssa-ccp.c 9 Apr 2005 01:37:23 -0000 2.64
+++ tree-ssa-ccp.c 14 Apr 2005 21:20:33 -0000
@@ -1071,7 +1071,7 @@ visit_assignment (tree stmt, tree *outpu
TREE_TYPE (TREE_OPERAND (orig_lhs, 0)),
val.value));
- orig_lhs = TREE_OPERAND (orig_lhs, 1);
+ orig_lhs = TREE_OPERAND (orig_lhs, 0);
if (w && is_gimple_min_invariant (w))
val.value = w;
else