summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-08-14 15:07:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-08-14 15:07:43 +0000
commit1a15bfdcdc93b45ddeb4701fa1d1d587305996fc (patch)
treeeed72790b8da7b6241bcc9287b383b2ba96bc6fd /gcc/ipa-prop.c
parent065312cfdd633dae0cf725104e07a2c05e2747e7 (diff)
downloadgcc-1a15bfdcdc93b45ddeb4701fa1d1d587305996fc.tar.gz
ipa-prop.c (compute_complex_pass_through): If we cannot compute a non-varying offset for IPA_JF_ANCESTOR punt.
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. From-SVN: r150757
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