]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bitint: Fix build [PR121413]
authorJakub Jelinek <jakub@redhat.com>
Wed, 6 Aug 2025 10:52:47 +0000 (12:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 6 Aug 2025 10:56:23 +0000 (12:56 +0200)
Sorry, my bootstrap failed last night because of this, I've fixed it
up and it bootstrapped/regtested fine overnight, but in the morning
forgot to adjust the patch before committing.

Without this there is
.../gimple-lower-bitint.cc:7678:36: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 7678 |                       if (min_prec > limb_prec && abi_limb_prec > limb_prec)
      |                           ~~~~~~~~~^~~~~~~~~~~

2025-08-06  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/121413
* gimple-lower-bitint.cc (gimple_lower_bitint): Fix up last
commit, cast limb_prec to unsigned before comparison.

gcc/gimple-lower-bitint.cc

index e7c7fe5f657cd338bcce8ed98376f8068eb50928..1e434ce7a0c96dbbc6010ddc75eb90bb205941a6 100644 (file)
@@ -7675,7 +7675,8 @@ gimple_lower_bitint (void)
                  else
                    {
                      min_prec = CEIL (min_prec, limb_prec) * limb_prec;
-                     if (min_prec > limb_prec && abi_limb_prec > limb_prec)
+                     if (min_prec > (unsigned) limb_prec
+                         && abi_limb_prec > limb_prec)
                        {
                          /* For targets with ABI limb precision higher than
                             limb precision round to ABI limb precision,