]> git.ipfire.org Git - thirdparty/gcc.git/commit
fix invalid bounds on array refs
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Dec 2015 17:11:52 +0000 (17:11 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Dec 2015 17:11:52 +0000 (17:11 +0000)
commitfead8d0e9fa09403ee0025458e0bbe0a37354aca
tree1e81e6d67ce52610d9ca4e70944d0e99453388dd
parentb3de8ca0929587ebad01140e270cec780221a46e
fix invalid bounds on array refs

While enabling graphite in -O3 we found a Fortran testcase that fails
because the max of the type domain is -1.  We used to add that as a constraint
to the elements accessed by the array, leading to a unfeasible constraint:
0 <= i <= -1.  Having that constraint, drops the data reference as that says
that there are no elements accessed in the array.

* graphite-dependences.c (scop_get_reads): Add extra dumps.
(scop_get_must_writes): Same.
(scop_get_may_writes): Same.
(compute_deps): Same.
* graphite-sese-to-poly.c (bounds_are_valid): New.
(pdr_add_data_dimensions): Call bounds_are_valid.

* gfortran.dg/graphite/run-id-3.f90: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231191 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/graphite-dependences.c
gcc/graphite-sese-to-poly.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/graphite/run-id-3.f90 [new file with mode: 0644]