This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR41919: Fix testcase for unsigned char targets


Hi,

the testcase for BZ 41919 fails on targets using an unsigned char data
type by default.

Fixed with the attached patch.

Ok for mainline?

Bye,

-Andreas-



2009-11-12  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.c-torture/execute/pr41919.c: Mark chars explicitely as signed.


Index: gcc/testsuite/gcc.c-torture/execute/pr41919.c
===================================================================
*** gcc/testsuite/gcc.c-torture/execute/pr41919.c.orig	2009-11-09 11:19:31.000000000 +0100
--- gcc/testsuite/gcc.c-torture/execute/pr41919.c	2009-11-12 15:46:31.000000000 +0100
*************** extern void abort (void);
*** 4,10 ****
  
  struct S1
  {
!   char f0;
  };
  
  int g_23 = 0;
--- 4,10 ----
  
  struct S1
  {
!   signed char f0;
  };
  
  int g_23 = 0;
*************** foo (void)
*** 25,31 ****
    return l_128;
  }
  
! static char bar(char si1, char si2)
  {
    return (si1 <= 0) ? si1 : (si2 * 2);
  }
--- 25,31 ----
    return l_128;
  }
  
! static signed char bar(signed char si1, signed char si2)
  {
    return (si1 <= 0) ? si1 : (si2 * 2);
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]