summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
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