diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-03 11:29:51 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-03 11:29:51 +0000 |
commit | bc79a76b630400ddbd6dd00aab74914e58349eb3 (patch) | |
tree | 72080893386c672511d6291de515bd51b739d6f2 /gcc/tree-ssa-ccp.c | |
parent | a184d2543b60149821b8d1c74368de470bd44608 (diff) | |
download | gcc-bc79a76b630400ddbd6dd00aab74914e58349eb3.tar.gz |
PR tree-optimization/39343
* tree-ssa-ccp.c (maybe_fold_offset_to_address): Don't check if
COMPONENT_REF t has ARRAY_TYPE.
* gcc.dg/pr39343.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144571 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index d6027268a7d..5080cc32ce7 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -1942,8 +1942,7 @@ maybe_fold_offset_to_address (tree addr, tree offset, tree orig_type) || (TREE_CODE (orig) == COMPONENT_REF && TREE_CODE (TREE_TYPE (TREE_OPERAND (orig, 1))) == ARRAY_TYPE)) && (TREE_CODE (t) == ARRAY_REF - || (TREE_CODE (t) == COMPONENT_REF - && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 1))) == ARRAY_TYPE)) + || TREE_CODE (t) == COMPONENT_REF) && !operand_equal_p (TREE_CODE (orig) == ARRAY_REF ? TREE_OPERAND (orig, 0) : orig, TREE_CODE (t) == ARRAY_REF |