On Fri, Nov 28, 2014 at 5:20 PM, Eric Botcazou <ebotca...@adacore.com> wrote: > Hi, > > the attached Ada testcase triggers an assertion in the RTL expander for the > address operator because the operator has been applied to a non-byte-aligned > record field. The problematic ADDR_EXPR is built by ipa_modify_call_arguments > which has a hole when get_addr_base_and_unit_offset returns NULL_TREE: the > variable offset case is handled but not the non-byte-aligned case, which can > rountinely happen in Ada, hence the proposed fix. > > Tested on x86_64-suse-linux, OK for the mainline?
Umm. So you are doing a possibly aggregate copy here? Or how are we sure we are dealing with a register op only? (the function is always a twisted maze to me...) That said - I suppose this is called from IPA-SRA? In that case, can't we please avoid doing the transform in the first place? Thanks, Richard. > > 2014-11-28 Eric Botcazou <ebotca...@adacore.com> > > * ipa-prop.c (ipa_modify_call_arguments): Properly deal with unaligned > aggregate parameters passed by value. > > > 2014-11-28 Eric Botcazou <ebotca...@adacore.com> > > * gnat.dg/specs/pack12.ads: New test. > > > -- > Eric Botcazou