]> git.ipfire.org Git - people/ms/gcc.git/commit
tree-optimization/108793 - niter compute type mismatch
authorRichard Biener <rguenther@suse.de>
Mon, 20 Feb 2023 11:58:50 +0000 (12:58 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 21 Feb 2023 13:02:58 +0000 (14:02 +0100)
commita7e706df2280de4a42f68b6c44401e4348d3593c
treee693cda033b51bd08424591afdde3fa0a296f2d5
parente28c5b33b987374f753b32306b0d3ecf610b64f2
tree-optimization/108793 - niter compute type mismatch

When computing the number of iterations until wrap types are mixed up,
eventually leading to checking ICEs with a pointer bitwise inversion.
The following uses niter_type for the calculation.

PR tree-optimization/108793
* tree-ssa-loop-niter.cc (number_of_iterations_until_wrap):
Use convert operands to niter_type when computing num.

* gcc.dg/torture/pr108793.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr108793.c [new file with mode: 0644]
gcc/tree-ssa-loop-niter.cc