summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-23 13:20:41 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-23 13:20:41 +0000
commitfb8b391ecb51a51cf50deb24823c3b089848f2ae (patch)
treeb293e3ccbf8e0a029d6133c38c71e73dd385f953 /gcc/ipa-prop.c
parent6107e73ffdc01f5d81c4e2f45e3d72e94fb8a158 (diff)
downloadgcc-fb8b391ecb51a51cf50deb24823c3b089848f2ae.tar.gz
2013-05-22 Martin Jambor <mjambor@suse.cz>
PR middle-end/57347 * tree.h (contains_bitfld_component_ref_p): Declare. * tree-sra.c (contains_bitfld_comp_ref_p): Move... * tree.c (contains_bitfld_component_ref_p): ...here. Adjust its caller. * ipa-prop.c (determine_known_aggregate_parts): Check that LHS does not access a bit-field. Assert all final offsets are byte-aligned. testsuite/ * gcc.dg/ipa/pr57347.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199252 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 ae2a823a4e5..7129b302156 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -1327,7 +1327,9 @@ determine_known_aggregate_parts (gimple call, tree arg,
lhs = gimple_assign_lhs (stmt);
rhs = gimple_assign_rhs1 (stmt);
- if (!is_gimple_reg_type (rhs))
+ if (!is_gimple_reg_type (rhs)
+ || TREE_CODE (lhs) == BIT_FIELD_REF
+ || contains_bitfld_component_ref_p (lhs))
break;
lhs_base = get_ref_base_and_extent (lhs, &lhs_offset, &lhs_size,
@@ -1418,6 +1420,7 @@ determine_known_aggregate_parts (gimple call, tree arg,
{
struct ipa_agg_jf_item item;
item.offset = list->offset - arg_offset;
+ gcc_assert ((item.offset % BITS_PER_UNIT) == 0);
item.value = unshare_expr_without_location (list->constant);
jfunc->agg.items->quick_push (item);
}