PR tree-optimization/32573
PR middle-end/32946
* tree-data-ref.c (initialize_data_dependence_relation): Clear
DDR_SUBSCRIPTS, DDR_DIR_VECTS and DDR_DIST_VECTS at the beginning.
(finalize_ddr_dependent): Clear DDR_SUBSCRIPTS after freeing it.
(build_classic_dist_vector): Return false rather than true if
DDR_ARE_DEPENDENT is non-NULL at the beginning. Return false
if either subscript_dependence_tester_1 or build_classic_dist_vector_1
returned false. Don't call save_dist_v before calling
build_classic_dist_vector_1.
(free_dependence_relation): Don't guard freeing DDR_SUBSCRIPTS
with NULL DDR_ARE_DEPENDENT. Also free DDR_DIST_VECTS and/or
DDR_DIR_VECTS vectors.
* gcc.dg/pr32573.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127750
138bc75d-0d04-0410-961f-
82ee72b054a4