diff mbox

[committed] Use signed char for loop var in gcc.c-torture/execute/pr58419.c

Message ID 5239B377.4030107@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Sept. 18, 2013, 2:06 p.m. UTC
Hi all,

The recently added testcase gcc.c-torture/execute/pr58419.c uses a char 
variable to count down with negative values.
But on some architectures (like arm) a char is by default unsigned, 
causing the loop to be infinite.

I've committed the attached patch to explicitly label the variable as 
signed char.
Committed as r202703.

This fixes a timeout failure I've observed on arm an aarch64.

Thanks,
Kyrill

[gcc/testsuite/]
2013-09-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.c-torture/execute/pr58419.c (b): Change type to signed char.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58419.c b/gcc/testsuite/gcc.c-torture/execute/pr58419.c
index 527fcb7..69cc040 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr58419.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58419.c
@@ -1,7 +1,8 @@ 
 int printf(const char *, ...);
 
-int a, g, i, k, *p; 
-char b, e;
+int a, g, i, k, *p;
+signed char b;
+char e;
 short c, h;
 static short *d = &c;