public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR32843, testsuite bug wrt sign/zero-extension of return  values
Date: Thu, 26 Jul 2007 09:25:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0707261113210.10096@zhemvz.fhfr.qr> (raw)


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

             reply	other threads:[~2007-07-26  9:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  9:25 Richard Guenther [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0707261113210.10096@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).