------- Comment #7 from spop at gcc dot gnu dot org 2007-06-23 18:10 ------- Subject: Re: [4.3 Regression] Segmentation fault in build_classic_dist_vector_1() at tree-data-ref.c:2700
Hi, In data dependence analysis, when the dependence distance is lexicographically negative, we recompute the dependence by inverting the source and the sink memory accesses, and thus we compute the dependence again but in the opposite direction. In one way we compute: MINUS_EXPR (unsigned int) i_434 + 1 (unsigned int) i_434 = 1 but when going the other way, backwards, we have to compute: MINUS_EXPR (unsigned int) i_434 (unsigned int) i_434 + 1 = ~(unsigned int) i_434 + (unsigned int) i_434 and instead of getting an integer_cst, we get that ugly expression from fold, the dependence test fails, and everything goes wrong from that point. With this patch we get the expected 0xffffffffffffffff for the above case. The patch teaches fold how to compute the minus expression for unsigned int and pointer expressions. Bootstrapped and tested on i686-linux. Okay for trunk? Sebastian ------- Comment #8 from spop at gcc dot gnu dot org 2007-06-23 18:10 ------- Created an attachment (id=13768) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13768&action=view) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32461