tree-optimization/98758 - fix integer arithmetic in data-ref analysis
authorRichard Biener <rguenther@suse.de>
Wed, 20 Jan 2021 07:48:34 +0000 (08:48 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 20 Jan 2021 08:38:22 +0000 (09:38 +0100)
commit34599780d0de72faf5719ea08d11a061722b9d19
tree7d7bed343ddc84aed63c12baad330f9d792b4171
parent7ab1abf3b82a3bcfff9b7bc596166fef6a0d83ab
tree-optimization/98758 - fix integer arithmetic in data-ref analysis

This fixes some int arithmetic issues and a bogus truncation.

2021-01-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98758
* tree-data-ref.c (int_divides_p): Use lambda_int arguments.
(lambda_matrix_right_hermite): Avoid undefinedness with
signed integer abs and multiplication.
(analyze_subscript_affine_affine): Use lambda_int.

* gcc.dg/torture/pr98758.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr98758.c [new file with mode: 0644]
gcc/tree-data-ref.c