]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix pr111456-1.c for targets that use unsigned char by default
authorAndrew Pinski <pinskia@gmail.com>
Tue, 26 Sep 2023 22:00:38 +0000 (15:00 -0700)
committerAndrew Pinski <pinskia@gmail.com>
Tue, 26 Sep 2023 22:03:43 +0000 (15:03 -0700)
This fixes the testcase to use an explicit `signed char` instead of plain `char`.

Committed as obvious after a test with a cross to powerpc64-linux-gnu and x86_64-linux-gnu.

gcc/testsuite/ChangeLog:

PR testsuite/111603
* gcc.dg/tree-ssa/pr111456-1.c: Use `signed char` instead of plain `char`.

gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c

index 8a2f730b3874071aceb68fede2f6b70d2ce7c48f..ffff664a1afad22eba12b0c9bdd26041d1eac426 100644 (file)
@@ -5,14 +5,14 @@
 void foo(void);
 static int i;
 static int *j = &i;
-static char l;
-static void(a)(char) {}
+static signed char l;
+static void(a)(signed char) {}
 static short(b)(short c, short d) { return c - d; }
 static short(e)(short f, int g) {
     return f < 0 || g < 0 || g >= 32 ? f : f >> g;
 }
 static short(h)(short f, int g) { return g >= 2 ?: f >> g; }
-static char k(char m, short n) {
+static signed char k(signed char m, short n) {
     short o;
     int *p = &i;
     if (!(((m) >= 1) && ((m) <= 1))) {