The char's in gcc.dg/builtin-arith-overflow-1.c are almost all explicitly
signed or unsigned, except for 2 of them, but that's enough to make it fail
for targets whose char is unsigned.
Tested on x86-64 and a private port, applied on mainline as obvious.
2014-12-11 Eric Botcazou <ebotca...@adacore.com>
* gcc.dg/builtin-arith-overflow-1.c (fn2): Take signed char.
(fn3): Likewise.
--
Eric Botcazou
Index: gcc.dg/builtin-arith-overflow-1.c
===================================================================
--- gcc.dg/builtin-arith-overflow-1.c (revision 218617)
+++ gcc.dg/builtin-arith-overflow-1.c (working copy)
@@ -17,7 +17,7 @@ fn1 (int x, unsigned int y)
/* MUL_OVERFLOW should be folded into unsigned multiplication,
because ovf is never used. */
__attribute__((noinline, noclone)) int
-fn2 (char x, long int y)
+fn2 (signed char x, long int y)
{
short int res;
int ovf = __builtin_mul_overflow (x, y, &res);
@@ -31,7 +31,7 @@ fn2 (char x, long int y)
/* ADD_OVERFLOW should be folded into unsigned addition,
because it never overflows. */
__attribute__((noinline, noclone)) int
-fn3 (char x, unsigned short y, int *ovf)
+fn3 (signed char x, unsigned short y, int *ovf)
{
int res;
*ovf = __builtin_add_overflow (x, y, &res);