diff mbox series

[2/4] test: use integers of different sizes, even on 32-bit

Message ID 20180909235327.26252-3-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series fix testsuite on 32-bit | expand

Commit Message

Luc Van Oostenryck Sept. 9, 2018, 11:53 p.m. UTC
The test optim/cse-size fials on 32-bit because it needs
two integers of different size but uses int & long.
These two types have indeed different sizes on 64-bit
(LP64) but not on 32-bit (ILP32).

Fix this by using short & int.

Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 validation/optim/cse-size.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/validation/optim/cse-size.c b/validation/optim/cse-size.c
index e98c3cde7..5b31420c8 100644
--- a/validation/optim/cse-size.c
+++ b/validation/optim/cse-size.c
@@ -1,7 +1,7 @@ 
 static void foo(void)
 {
-	unsigned p = 0;
-	long x;
+	unsigned short p = 0;
+	int x;
 
 	for (;;)
 		if (p)