]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-chrec: Use signed_type_for in convert_affine_scev
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 May 2025 06:21:14 +0000 (08:21 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 May 2025 06:21:14 +0000 (08:21 +0200)
commite38027c8ff449ffadaca449004bb891b9094ad00
tree87fce5a6e5ed72c7bfbf5b5048e3811027e0d5e0
parent092dcef93d40ff3dfed6c35001325bf522785c25
tree-chrec: Use signed_type_for in convert_affine_scev

On s390x-linux I've run into the gcc.dg/torture/bitint-27.c test ICEing in
build_nonstandard_integer_type called from convert_affine_scev (not sure
why it doesn't trigger on x86_64/aarch64).
The problem is clear, when ct is a BITINT_TYPE with some large
TYPE_PRECISION, build_nonstandard_integer_type won't really work on it.

The patch fixes it similarly what has been done for GCC 14 in various
other spots.

2025-05-20  Jakub Jelinek  <jakub@redhat.com>

* tree-chrec.cc (convert_affine_scev): Use signed_type_for instead of
build_nonstandard_integer_type.
gcc/tree-chrec.cc