This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, The problem here is that SCCP (via scalar evolution) was creating an assignment to a pointer type with an integer. The problem here is that I (and Zdenek as he originally did this part) misunderstood that the type_rhs in follow_ssa_edge_in_rhs mean the type of the right hand side of the assignment and not the right hand side of the PLUS operator. This patch fixes it by reverting part of the original patch that fixed up scev and changes it so we use the code (PLUS_EXPR or POINTER_PLUS_EXPR) in the call to add_to_evolution. Committed to the branch after a build/test on spu-elf with no regressions. Thanks, Andrew Pinski ChangeLog: * tree-scalar-evolution.c (follow_ssa_edge_in_rhs <case POINTER_PLUS_EXPR>): Do not change type_rhs. (follow_ssa_edge_in_rhs <case POINTER_PLUS_EXPR, case PLUS_EXPR>): Use the code of the orginal expression instead of just PLUS_EXPR. Also use type_rhs where TREE_TYPE (rhs) was used (reverting back to the trunk). * gcc.c-torture/compile/20070605-1.c: New test.
Attachment:
fixpr32225.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |