PATCH: gcc.c-torture/execute/20001009-2.c

Jeffrey Oldham oldham@codesourcery.com
Sat Dec 30 09:01:00 GMT 2000


2000-12-30  Jeffrey Oldham  <oldham@codesourcery.com>

	* gcc.c-torture/execute/20001009-2.c (foo): Test only works for
	signed char, not default char.

For Irix6.5, the default char is unsigned so the original test, which
checked that (char)0xff == -1, fails.

Tested on       i686-pc-linux-gnu and mips-sgi-irix6.5.
Approved by     Mark Mitchell.

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
Index: 20001009-2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/gcc.c-torture/execute/20001009-2.c,v
retrieving revision 1.2
diff -c -p -r1.2 20001009-2.c
*** 20001009-2.c	2000/11/19 09:33:30	1.2
--- 20001009-2.c	2000/12/30 16:40:20
*************** int foo()
*** 8,14 ****
    {
      c=1;
      asm(""::"r"(c));
!     c=(char)a;
    }
    if (c!=-1)
      abort();
--- 8,14 ----
    {
      c=1;
      asm(""::"r"(c));
!     c=(signed char)a;
    }
    if (c!=-1)
      abort();


More information about the Gcc-patches mailing list