aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKwok Cheung Yeung <kcy@codesourcery.com>2020-08-12 05:19:11 -0700
committerKwok Cheung Yeung <kcy@codesourcery.com>2020-08-12 05:24:01 -0700
commit36507a2c9cbac673553b043aa1817e674836c232 (patch)
tree01e8347a055dc9e2275684fd9a9095011eec785e /gcc
parentfb9b3c0ff7d347934b364e3ab06d4cf56726df33 (diff)
downloadgcc-36507a2c9cbac673553b043aa1817e674836c232.zip
gcc-36507a2c9cbac673553b043aa1817e674836c232.tar.gz
gcc-36507a2c9cbac673553b043aa1817e674836c232.tar.bz2
Fix gcc.dg/ia64-sync-5.c for architectures with unsigned char as default (PR 96519)
If char is unsigned, then comparisons of the char array elements against negative integers in the test will fail as values in the array will always be positive, and will remain so when promoted to signed int. 2020-08-12 Kwok Cheung Yeung <kcy@codesourcery.com> PR testsuite/96519 gcc/testsuite/ * gcc.dg/ia64-sync-5.c (AC, init_qi, test_qi): Change element type to signed char.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-5.c b/gcc/testsuite/gcc.dg/ia64-sync-5.c
index 8b16b29b..a3923b0 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-5.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-5.c
@@ -14,9 +14,9 @@ extern void abort (void);
extern void *memcpy (void *, const void *, size_t);
extern int memcmp (const void *, const void *, size_t);
-static char AC[4];
-static char init_qi[4] = { -30,-30,-50,-50 };
-static char test_qi[4] = { -115,-115,25,25 };
+static signed char AC[4];
+static signed char init_qi[4] = { -30,-30,-50,-50 };
+static signed char test_qi[4] = { -115,-115,25,25 };
static void
do_qi (void)