On April 1, 2016 5:26:21 PM GMT+02:00, Bernd Schmidt <bschm...@redhat.com> wrote: >On 04/01/2016 11:08 AM, Richard Biener wrote: >> { >> ! if (canon_true_dependence (s_info->mem, >> ! GET_MODE (s_info->mem), >> ! s_info->mem_addr, >> ! mem, mem_addr)) >> { >> s_info->rhs = NULL; >> s_info->const_rhs = NULL; >> --- 1609,1617 ---- >> the value of store_info. If it is, set the rhs to NULL to >> keep it from being used to remove a load. */ >> { >> ! if (canon_output_dependence (s_info->mem, true, >> ! mem, GET_MODE (mem), >> ! mem_addr)) >> { >> s_info->rhs = NULL; >> s_info->const_rhs = NULL; > >I think the patch is ok, but there is a comment in that function which >references canon_true_dependence; that should also be fixed up. > >Isn't the testcase invalid though? I thought accesses through char * >pointers bypass aliasing rules, but accessing a char array through int >* >and long * pointers doesn't?
It doesn't bypass aliasing rules but instead stores change the dynamic type of memory. But the tests case is invalid for reasons of alignment, I'll adjust it accordingly before committing. Richard. > >Bernd