linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: [PATCH] bug-assign-op0.c: fix test on 32-bit builds
Date: Tue, 11 Aug 2020 04:15:23 +0100	[thread overview]
Message-ID: <69f6f834-b350-5553-8227-1c7b4c6532c2@ramsayjones.plus.com> (raw)


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Luc,

Tonight my 32-bit build/test run on 32-bit Linux failed this test.

The first version of this patch was a simple one-liner to add an
'-m64' argument to the test-linearize 'check-command'. This seems
to be the usual fix for this, but I thought I would try something
different. ;-)

If you prefer the one-liner, then go with that (I tested it on 32-bit
Linux, but not on 64-bit Linux - I can't imagine that it would fail!).

ATB,
Ramsay Jones

 validation/linear/bug-assign-op0.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/validation/linear/bug-assign-op0.c b/validation/linear/bug-assign-op0.c
index b351bb51..3a2bef3c 100644
--- a/validation/linear/bug-assign-op0.c
+++ b/validation/linear/bug-assign-op0.c
@@ -10,7 +10,7 @@ unsigned int lsr(unsigned int u)
 	return u;
 }
 
-int divr(int s, unsigned long u)
+int divr(int s, unsigned long long u)
 {
 	extern int use(int, unsigned);
 	int t = s;
@@ -19,25 +19,25 @@ int divr(int s, unsigned long u)
 	return use(s, u);
 }
 
-int sdivul(int s, unsigned long u)
+int sdivul(int s, unsigned long long u)
 {
 	s /= u;			// divu
 	return s;
 }
 
-unsigned int udivsl(unsigned int u, long s)
+unsigned int udivsl(unsigned int u, long long s)
 {
 	u /= s;			// divs
 	return u;
 }
 
-int uldivs(int s, unsigned long u)
+int uldivs(int s, unsigned long long u)
 {
 	u /= s;			// divu
 	return u;
 }
 
-unsigned int sldivu(unsigned int u, long s)
+unsigned int sldivu(unsigned int u, long long s)
 {
 	s /= u;			// divs
 	return s;
-- 
2.28.0

             reply	other threads:[~2020-08-11  3:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  3:15 Ramsay Jones [this message]
2020-08-11  4:45 ` [PATCH] bug-assign-op0.c: fix test on 32-bit builds Luc Van Oostenryck

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=69f6f834-b350-5553-8227-1c7b4c6532c2@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    /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 NNTP newsgroup(s).