public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Stubbs <ams@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/omp/gcc-12] omp-simd-clone: Unbreak bootstrap
Date: Thu,  1 Sep 2022 10:48:53 +0000 (GMT)	[thread overview]
Message-ID: <20220901104853.27BDB382DB25@sourceware.org> (raw)

https://gcc.gnu.org/g:f8227cfa275c1ccefacd0786216a1e871e24e380

commit f8227cfa275c1ccefacd0786216a1e871e24e380
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Aug 31 10:20:54 2022 +0200

    omp-simd-clone: Unbreak bootstrap
    
    This patch fixes -Werror=sign-compare errors during stage2/stage3.
    
    2022-08-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
                Jakub Jelinek  <jakub@redhat.com>
    
            * omp-simd-clone.cc (simd_clone_adjust_return_type,
            simd_clone_adjust_argument_types): Use known_eq (veclen, 0U)
            instead of known_eq (veclen, 0) to avoid -Wsign-compare warnings.
    
    (cherry picked from commit 437bde93dcde8309bb23ee255924c697e8e70df9)

Diff:
---
 gcc/ChangeLog.omp     | 10 ++++++++++
 gcc/omp-simd-clone.cc |  6 +++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index 04fdec04baa..5ed915edaec 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,13 @@
+2022-09-01  Andrew Stubbs  <ams@codesourcery.com>
+
+	Backport from mainline:
+	2022-08-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+		    Jakub Jelinek  <jakub@redhat.com>
+
+	* omp-simd-clone.cc (simd_clone_adjust_return_type,
+	simd_clone_adjust_argument_types): Use known_eq (veclen, 0U)
+	instead of known_eq (veclen, 0) to avoid -Wsign-compare warnings.
+
 2022-09-01  Andrew Stubbs  <ams@codesourcery.com>
 
 	Backport from mainline:
diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc
index c3ab1834167..756c4a89bfc 100644
--- a/gcc/omp-simd-clone.cc
+++ b/gcc/omp-simd-clone.cc
@@ -504,7 +504,7 @@ simd_clone_adjust_return_type (struct cgraph_node *node)
     veclen = node->simdclone->vecsize_int;
   else
     veclen = node->simdclone->vecsize_float;
-  if (known_eq (veclen, 0))
+  if (known_eq (veclen, 0U))
     veclen = node->simdclone->simdlen;
   else
     veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t)));
@@ -621,7 +621,7 @@ simd_clone_adjust_argument_types (struct cgraph_node *node)
 	    veclen = sc->vecsize_int;
 	  else
 	    veclen = sc->vecsize_float;
-	  if (known_eq (veclen, 0))
+	  if (known_eq (veclen, 0U))
 	    veclen = sc->simdlen;
 	  else
 	    veclen
@@ -676,7 +676,7 @@ simd_clone_adjust_argument_types (struct cgraph_node *node)
 	veclen = sc->vecsize_int;
       else
 	veclen = sc->vecsize_float;
-      if (known_eq (veclen, 0))
+      if (known_eq (veclen, 0U))
 	veclen = sc->simdlen;
       else
 	veclen = exact_div (veclen,

                 reply	other threads:[~2022-09-01 10:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220901104853.27BDB382DB25@sourceware.org \
    --to=ams@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).