This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32461] [4.3 Regression] Segmentation fault in build_classic_dist_vector_1() at tree-data-ref.c:2700
- From: "spop at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2007 18:10:53 -0000
- Subject: [Bug tree-optimization/32461] [4.3 Regression] Segmentation fault in build_classic_dist_vector_1() at tree-data-ref.c:2700
- References: <bug-32461-13856@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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