Comments

Hi,
the following patch fixes PR 56988 by distinguishing between by
reference and by value aggregate replacement value. While it is OK to
ignore the difference in the last phases of propagation/decision
making because any discrepancies have already been weeded out there,
the testcase clearly shows we have to make sure we do not confuse the
two when looking at the statements again.
Bootstrapped and tested on trunk on x86_64-linux. OK for trunk now
and for the 4.8 branch after a round of testing there?
Thanks,
Martin
2013-04-18 Martin Jambor <mjambor@suse.cz>
PR middle-end/56988
* ipa-prop.h (ipa_agg_replacement_value): New flag by_ref.
* ipa-cp.c (ipa_get_indirect_edge_target_1): Also check that by_ref
flags match.
(find_aggregate_values_for_callers_subset): Fill in the by_ref flag of
ipa_agg_replacement_value structures.
(known_aggs_to_agg_replacement_list): Likewise.
* ipa-prop.c (write_agg_replacement_chain): Stream by_ref flag.
(read_agg_replacement_chain): Likewise.
(ipcp_transform_function): Also check that by_ref flags match.
testsuite/
* gcc.dg/ipa/pr56988.c: New test.