diff options
author | Martin Jambor <mjambor@suse.cz> | 2013-05-23 13:25:23 +0000 |
---|---|---|
committer | Martin Jambor <mjambor@suse.cz> | 2013-05-23 13:25:23 +0000 |
commit | fb0fedc06ba61248e07ca1bbc5b7b24294b056c2 (patch) | |
tree | ce0265acbc3776d731a1d1e0e4d42256c8fbffa5 /gcc/ipa-prop.c | |
parent | fb41bbb28f0b73cf00cc9ae9568374e82a61f6ca (diff) |
2013-05-23 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: https://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@199253 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 73b65fbcd90..53cd5ed325f 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1268,7 +1268,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, @@ -1359,6 +1361,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); } |