From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11520 invoked by alias); 26 Jul 2007 09:12:09 -0000 Received: (qmail 11510 invoked by uid 22791); 26 Jul 2007 09:12:09 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 09:12:04 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 661DC215B6 for ; Thu, 26 Jul 2007 11:12:01 +0200 (CEST) Date: Thu, 26 Jul 2007 09:25:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR32843, testsuite bug wrt sign/zero-extension of return values Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01891.txt.bz2 This patch: 2007-07-09 Richard Guenther 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 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); }