diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 13:39:37 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 13:39:37 +0000 |
commit | ced8653a8fddea19422fb5ce377de3f91bc2bd05 (patch) | |
tree | f581fc6f99fb9a7212b2d307382a4b4a5cf54d48 /gcc/ipa-prop.c | |
parent | 558682939b222cbaf679ca3282ca2969638abf4c (diff) | |
download | gcc-ced8653a8fddea19422fb5ce377de3f91bc2bd05.tar.gz |
gcc/:
PR middle-end/45687
* ipa-prop.c (ipa_modify_call_arguments): Correct type of MEM_REF
offset.
gcc/testsuite:
* gcc.c-torture/execute/20101025-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 9ffbb3f90a9..b3d9f91dcea 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2186,7 +2186,7 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gimple stmt, if (TREE_CODE (base) == ADDR_EXPR && DECL_P (TREE_OPERAND (base, 0))) - off = build_int_cst (reference_alias_ptr_type (base), + off = build_int_cst (TREE_TYPE (base), adj->offset / BITS_PER_UNIT); else if (TREE_CODE (base) != ADDR_EXPR && POINTER_TYPE_P (TREE_TYPE (base))) @@ -2209,7 +2209,7 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gimple stmt, } else if (TREE_CODE (base) == MEM_REF) { - off = build_int_cst (TREE_TYPE (TREE_OPERAND (base,1)), + off = build_int_cst (TREE_TYPE (TREE_OPERAND (base, 1)), base_offset + adj->offset / BITS_PER_UNIT); off = int_const_binop (PLUS_EXPR, TREE_OPERAND (base, 1), @@ -2218,7 +2218,7 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gimple stmt, } else { - off = build_int_cst (reference_alias_ptr_type (base), + off = build_int_cst (reference_alias_ptr_type (prev_base), base_offset + adj->offset / BITS_PER_UNIT); base = build_fold_addr_expr (base); |