public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR32843, testsuite bug wrt sign/zero-extension of return  values
@ 2007-07-26  9:25 Richard Guenther
  2007-07-26 14:17 ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Guenther @ 2007-07-26  9:25 UTC (permalink / raw)
  To: gcc-patches


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);
  }

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-08-07 12:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-26  9:25 [PATCH] Fix PR32843, testsuite bug wrt sign/zero-extension of return values Richard Guenther
2007-07-26 14:17 ` Paolo Bonzini
2007-07-26 14:25   ` Richard Guenther
2007-07-26 14:28     ` Andrew Haley
2007-07-26 14:48       ` Richard Guenther
2007-07-26 14:54         ` Andrew Haley
2007-07-27 18:28           ` Andrew Haley
2007-07-27 19:28             ` Richard Guenther
2007-07-30 13:58               ` Andrew Haley
2007-08-06 12:46                 ` Andrew Haley
2007-08-07 12:46                   ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).