https://gcc.gnu.org/g:685527a408ea025591c7f887566d7049ddd72c02

commit r16-3041-g685527a408ea025591c7f887566d7049ddd72c02
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Aug 6 12:52:47 2025 +0200

    bitint: Fix build [PR121413]
    
    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  <ja...@redhat.com>
    
            PR tree-optimization/121413
            * gimple-lower-bitint.cc (gimple_lower_bitint): Fix up last
            commit, cast limb_prec to unsigned before comparison.

Diff:
---
 gcc/gimple-lower-bitint.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/gimple-lower-bitint.cc b/gcc/gimple-lower-bitint.cc
index e7c7fe5f657c..1e434ce7a0c9 100644
--- a/gcc/gimple-lower-bitint.cc
+++ b/gcc/gimple-lower-bitint.cc
@@ -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,

Reply via email to