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] Fix PR32843, testsuite bug wrt sign/zero-extension of return values


This patch:

2007-07-09  Richard Guenther  <rguenther@suse.de>

	cp/
	* decl.c (start_preparsed_function): Do not promote return type.

	* c-decl.c (start_function): Do not promote return type.

changed how we extend a signed char to fill %eax on x86 from sign to
zero extension which now makes libffi.call/return_sc.c fail because
this testcase explicitly checks for sign-extension of signed character
return values.

Fixed by verifying the return value as signed char instead.

This patch was approved by Andreas Tobler in the PR audit trail and
committed to mainline.

Richard.

2007-07-26  Richard Guenther  <rguenther@suse.de>

	PR testsuite/32843
	* testsuite/libffi.call/return_sc.c (main): Verify call
	result as signed char, not ffi_arg.

Index: testsuite/libffi.call/return_sc.c
===================================================================
*** testsuite/libffi.call/return_sc.c	(revision 126677)
--- testsuite/libffi.call/return_sc.c	(working copy)
*************** int main (void)
*** 30,36 ****
         sc < (signed char) 127; sc++)
      {
        ffi_call(&cif, FFI_FN(return_sc), &rint, values);
!       CHECK(rint == (ffi_arg) sc);
      }
    exit(0);
  }
--- 30,36 ----
         sc < (signed char) 127; sc++)
      {
        ffi_call(&cif, FFI_FN(return_sc), &rint, values);
!       CHECK((signed char) rint == sc);
      }
    exit(0);
  }


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