Hi, On Thu, Dec 01, 2016 at 01:43:16PM +0100, Richard Biener wrote: > On Thu, Dec 1, 2016 at 11:07 AM, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: > > Hi, > > As mentioned in PR, the issue seems to be that in > > propagate_bits_accross_jump_functions(), > > ipa_get_type() returns record_type during WPA and hence we pass > > invalid precision to > > ipcp_bits_lattice::meet_with (value, mask, precision) which eventually > > leads to runtime error. > > The attached patch tries to fix that, by bailing out if type of param > > is not integral or pointer type. > > This happens for the edge from deque_test -> > > _Z4copyIPd1BEvT_S2_T0_.isra.0/9. > > Feels more like a DECL_BY_REFERENCE mishandling and should be fixed elsewhere.
That is indeed what is happening. Prathamesh, if you are going to save the type of arguments in the jump function, it should help you also with this issue. I know it was me who suggested using the function type to get at them and am sorry, I did not realize there potential issues with promotions and by_reference passing. By the way, please be careful not to introduce code style violations, especially lines exceeding 80 characters and adding trailing whitespace (propagate_bits_accross_jump_function has a few instances of both), I'd suggest setting your editor to highlight them. Thanks, Martin