public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] ubsan: nios2: left shift cannot be represented in type 'int'
Date: Tue, 17 Dec 2019 02:13:00 -0000	[thread overview]
Message-ID: <8a92faab92e359a860da6c69741acd1fac24dad6@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 8a92faab92e359a860da6c69741acd1fac24dad6 ***

commit 8a92faab92e359a860da6c69741acd1fac24dad6
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Mon Dec 16 09:58:52 2019 +1030
Commit:     Alan Modra <amodra@gmail.com>
CommitDate: Mon Dec 16 17:35:13 2019 +1030

    ubsan: nios2: left shift cannot be represented in type 'int'
    
            * nios2-dis.c (nios2_print_insn_arg): Avoid signed overflow

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1e13b1f734..113fd09264 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2019-12-16  Alan Modra  <amodra@gmail.com>
+
+	* nios2-dis.c (nios2_print_insn_arg): Avoid signed overflow
+
 2019-12-16  Alan Modra  <amodra@gmail.com>
 
 	* xstormy16-ibld.c: Regenerate.
diff --git a/opcodes/nios2-dis.c b/opcodes/nios2-dis.c
index 731860c409..d548adc608 100644
--- a/opcodes/nios2-dis.c
+++ b/opcodes/nios2-dis.c
@@ -858,7 +858,7 @@ nios2_print_insn_arg (const char *argptr,
 		if (i & (1 << 10))
 		  reglist |= (1 << 28);
 		if (i & (1 << 11))
-		  reglist |= (1 << 31);
+		  reglist |= (1u << 31);
 	      }
 	    else
 	      reglist = i << 2;
@@ -887,7 +887,7 @@ nios2_print_insn_arg (const char *argptr,
 	for (k = (dir == 1 ? 0 : 31);
 	     (dir == 1 && k < 32) || (dir == -1 && k >= 0);
 	     k += dir)
-	  if (reglist & (1 << k))
+	  if (reglist & (1u << k))
 	    {
 	      if (t)
 		(*info->fprintf_func) (info->stream, ",");


             reply	other threads:[~2019-12-17  2:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17  2:13 gdb-buildbot [this message]
2019-12-17  2:13 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-12-17  2:37 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
2019-12-17  2:53 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2019-12-18 22:03 ` Failures on Fedora-i686, " gdb-buildbot
2019-12-18 22:06 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-12-18 22:35 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-12-18 22:46 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-12-18 22:58 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-12-18 23:00 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2019-12-18 23:27 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-12-18 23:49 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
  -- strict thread matches above, loose matches on Subject: below --
2019-12-11 12:45 [binutils-gdb] ubsan: nios2: left shift cannot be represented in type 'int' gdb-buildbot

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=8a92faab92e359a860da6c69741acd1fac24dad6@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.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).