summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-14 15:07:43 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-14 15:07:43 +0000
commit8700909ca9dc38ded589a295292951eed0e23476 (patch)
treeeed72790b8da7b6241bcc9287b383b2ba96bc6fd /gcc/ipa-prop.c
parenta0ef520163e002c6a108b448c23defeb28df0839 (diff)
downloadgcc-8700909ca9dc38ded589a295292951eed0e23476.tar.gz
2009-08-14 Richard Guenther <rguenther@suse.de>
* ipa-prop.c (compute_complex_pass_through): If we cannot compute a non-varying offset for IPA_JF_ANCESTOR punt. * gcc.c-torture/execute/20090814-1.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150757 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 2842088d8f1..23710067ee7 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -377,7 +377,10 @@ compute_complex_pass_through (struct ipa_node_params *info,
type = TREE_TYPE (op1);
op1 = get_ref_base_and_extent (op1, &offset, &size, &max_size);
- if (TREE_CODE (op1) != INDIRECT_REF)
+ if (TREE_CODE (op1) != INDIRECT_REF
+ /* If this is a varying address, punt. */
+ || max_size == -1
+ || max_size != size)
return;
op1 = TREE_OPERAND (op1, 0);
if (TREE_CODE (op1) != SSA_NAME