From patchwork Thu Jan 17 11:59:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 213226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 01E1F2C007B for ; Thu, 17 Jan 2013 23:00:33 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1359028834; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=u7Pqf+t3XS0zyexe76qH EOcDoPs=; b=l9txcqVt27berk8mY+tnYDIzoQ7GfVOtFqWDc075nY6mnUp0wdsV 4Kyq+XiwOJWkPoYcfZbSLEIR+wwkaIxC9dwK4gN+XkK7yhOMMvPuh/HMxN3JG3Fx EgLKuaCs63wh7DAU1knhS6yKJzixGcIRYng30lCpkDTAx0kqy5MVMHw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=caivXcatzEMGy24W4LPJ6fDOYPT/55EjuvZ/2jS/uCGJ9qNj9zWe1JSLxIG4MJ /DhsH09LXGoZreMKR1BPmZGssqj+1Gf6XfiFe8cYpB/nsHCaxFF53FORuBhxVabw kXTf5OqFUGYtGatUbUZx/qUgnciX0QKaNhmuGbkXZC7yY=; Received: (qmail 8769 invoked by alias); 17 Jan 2013 12:00:29 -0000 Received: (qmail 8761 invoked by uid 22791); 17 Jan 2013 12:00:28 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS, TW_BF X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Jan 2013 12:00:01 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0HC01Ns011183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 17 Jan 2013 07:00:01 -0500 Received: from zalov.redhat.com (vpn1-5-204.ams2.redhat.com [10.36.5.204]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0HBxxlg012123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jan 2013 07:00:00 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id r0HBxwjH015235; Thu, 17 Jan 2013 12:59:58 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r0HBxwfq015234; Thu, 17 Jan 2013 12:59:58 +0100 Date: Thu, 17 Jan 2013 12:59:56 +0100 From: Jakub Jelinek To: Anthony Green Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Backport https://github.com/atgreen/libffi/commit/0de3277b18cf54be3b81d509b9be9b47d9bc1e82 to gcc libffi (PR middle-end/56000) Message-ID: <20130117115956.GO7269@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi! Is it ok to backport https://github.com/atgreen/libffi/commit/0de3277b18cf54be3b81d509b9be9b47d9bc1e82 fix from upstream to gcc's libffi copy? The tests fail on various targets. 2013-01-07 Thorsten Glaser * testsuite/libffi.call/cls_uchar_va.c, testsuite/libffi.call/cls_ushort_va.c, testsuite/libffi.call/va_1.c: Testsuite fixes. Jakub --- libffi/testsuite/libffi.call/cls_uchar_va.c +++ libffi/testsuite/libffi.call/cls_uchar_va.c @@ -12,9 +12,9 @@ typedef unsigned char T; static void cls_ret_T_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__) { - *(T *)resp = *(T *)args[0]; + *(ffi_arg *)resp = *(T *)args[0]; - printf("%d: %d %d\n", *(T *)resp, *(T *)args[0], *(T *)args[1]); + printf("%d: %d %d\n", (int)(*(ffi_arg *)resp), *(T *)args[0], *(T *)args[1]); } typedef T (*cls_ret_T)(T, ...); --- libffi/testsuite/libffi.call/cls_ushort_va.c +++ libffi/testsuite/libffi.call/cls_ushort_va.c @@ -12,9 +12,9 @@ typedef unsigned short T; static void cls_ret_T_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__) { - *(T *)resp = *(T *)args[0]; + *(ffi_arg *)resp = *(T *)args[0]; - printf("%d: %d %d\n", *(T *)resp, *(T *)args[0], *(T *)args[1]); + printf("%d: %d %d\n", (int)(*(ffi_arg *)resp), *(T *)args[0], *(T *)args[1]); } typedef T (*cls_ret_T)(T, ...); --- libffi/testsuite/libffi.call/va_1.c +++ libffi/testsuite/libffi.call/va_1.c @@ -5,7 +5,7 @@ Originator: ARM Ltd. */ /* { dg-do run } */ -/* { dg-output "" { xfail avr32*-*-* x86_64-*-*-* } } */ +/* { dg-output "" { xfail avr32*-*-* } } */ #include "ffitest.h" #include @@ -132,10 +132,10 @@ main (void) arg_types[1] = &s_type; arg_types[2] = &l_type; arg_types[3] = &s_type; - arg_types[4] = &ffi_type_uint; - arg_types[5] = &ffi_type_sint; - arg_types[6] = &ffi_type_uint; - arg_types[7] = &ffi_type_sint; + arg_types[4] = &ffi_type_uchar; + arg_types[5] = &ffi_type_schar; + arg_types[6] = &ffi_type_ushort; + arg_types[7] = &ffi_type_sshort; arg_types[8] = &ffi_type_uint; arg_types[9] = &ffi_type_sint; arg_types[10] = &ffi_type_ulong;