From patchwork Wed Jun 29 08:26:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 102536 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 90D4CB6F54 for ; Wed, 29 Jun 2011 18:27:18 +1000 (EST) Received: (qmail 4072 invoked by alias); 29 Jun 2011 08:27:12 -0000 Received: (qmail 4031 invoked by uid 22791); 29 Jun 2011 08:27:09 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_BF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jun 2011 08:26:51 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 3F37F321; Wed, 29 Jun 2011 10:26:50 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gkK0d9GZvUuh; Wed, 29 Jun 2011 10:26:46 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 33403320; Wed, 29 Jun 2011 10:26:46 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p5T8Qj92023739; Wed, 29 Jun 2011 10:26:45 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org, libffi-discuss@sourceware.org, Andreas Tobler Subject: [testsuite, libffi] XFAIL libffi.call/cls_{, long}double_va.c on IRIX 6.5 (PR libffi/46660) Date: Wed, 29 Jun 2011 10:26:45 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 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 A fresh look at the remaining two libffi testsuite failures on IRIX 6.5 revealed why they cannot currently work: FAIL: libffi.call/cls_double_va.c -O0 -W -Wall output pattern test, is 0.0 FAIL: libffi.call/cls_longdouble_va.c -O0 -W -Wall output pattern test, is 0.0 Those tests pass floating point arguments to varargs functions, which libffi currently (i.e. before 3.0.11) doesn't support. Unfortunately, the MIPS N32 and N64 ABIs pass floating point args in integer registers in this case, as described in the MIPSpro N32 ABI Handbook, p. 7: http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=bks&srch=&fname=/SGI_Developer/Mpro_n32_ABI/sgi_html/ch02.html while for the O32 ABI there's no difference between varargs and non-varargs functions. The following patch handles this. On mainline and the 4.6 branch, it xfails the tests on IRIX 6. The 4.5 branch is a bit different: since the O32 ABI is still supported there, the difference between them needs to be taken into account. Unfortunately, dg-output doesn't take the input-opts and exclude-opts parameters dg-xfail-if and dg-skip-if do (and is taken from upstream DejaGnu, not overridden/implemented in GCC), so I'm forced to use dg-skip-if. Even dg-xfail-if is not enough since the execution tests would XPASS and the output test FAIL. Unfortunately, libffi has its own implementation of dg-xfail-if and is missing dg-skip-if completely. To deal with this without duplication, I include the implementation from gcc/testsuite/lib, which shouldn't be an issue since other .exp files are already included from there. Tested on mips-sgi-irix6.5 with the appropriate runtest invocations. For the 4.5 branch, I've rerun the whole libffi testsuite for all 3 ABIs to make sure nothing broke. Installed on mainline, 4.6 and 4.5 branches. Rainer Mainline/4.6 branch version: 2011-06-29 Rainer Orth PR libffi/46660 * testsuite/libffi.call/cls_double_va.c: xfail dg-output on mips-sgi-irix6*. * testsuite/libffi.call/cls_longdouble_va.c: Likewise. Index: libffi/testsuite/libffi.call/cls_double_va.c =================================================================== --- libffi/testsuite/libffi.call/cls_double_va.c (revision 175617) +++ libffi/testsuite/libffi.call/cls_double_va.c (working copy) @@ -6,6 +6,7 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* } } */ +/* { dg-output "PR libffi/46660" { xfail mips-sgi-irix6* } } */ /* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */ #include "ffitest.h" Index: libffi/testsuite/libffi.call/cls_longdouble_va.c =================================================================== --- libffi/testsuite/libffi.call/cls_longdouble_va.c (revision 175617) +++ libffi/testsuite/libffi.call/cls_longdouble_va.c (working copy) @@ -6,6 +6,7 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */ +/* { dg-output "PR libffi/46660" { xfail mips-sgi-irix6* } } */ /* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */ #include "ffitest.h" 4.5 branch version: 2011-06-29 Rainer Orth PR libffi/46660 * testsuite/lib/libffi-dg.exp: Load target-supports.exp, target-supports-dg.exp. (dg-xfail-if): Remove. * testsuite/libffi.call/cls_double_va.c: Skip on mips-sgi-irix6* unless -mabi=32. * testsuite/libffi.call/cls_longdouble_va.c: Likewise. Index: libffi/testsuite/libffi.call/cls_double_va.c =================================================================== --- libffi/testsuite/libffi.call/cls_double_va.c (revision 175619) +++ libffi/testsuite/libffi.call/cls_double_va.c (working copy) @@ -6,6 +6,7 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* } } */ +/* { dg-skip-if "PR libffi/46660" { mips-sgi-irix6* } { "*" } { "-mabi=32" } } */ #include "ffitest.h" static void Index: libffi/testsuite/libffi.call/cls_longdouble_va.c =================================================================== --- libffi/testsuite/libffi.call/cls_longdouble_va.c (revision 175619) +++ libffi/testsuite/libffi.call/cls_longdouble_va.c (working copy) @@ -6,6 +6,7 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */ +/* { dg-skip-if "PR libffi/46660" { mips-sgi-irix6* } { "*" } { "-mabi=32" } } */ #include "ffitest.h" static void Index: libffi/testsuite/lib/libffi-dg.exp =================================================================== --- libffi/testsuite/lib/libffi-dg.exp (revision 175619) +++ libffi/testsuite/lib/libffi-dg.exp (working copy) @@ -1,4 +1,5 @@ -# Copyright (C) 2003, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005, 2008, 2009, 2010, 2011 +# Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,6 +22,8 @@ load_lib dg.exp load_lib libgloss.exp +load_gcc_lib target-supports.exp +load_gcc_lib target-supports-dg.exp load_gcc_lib target-libpath.exp load_gcc_lib wrapper.exp @@ -261,18 +264,6 @@ } -# Like check_conditional_xfail, but callable from a dg test. - -proc dg-xfail-if { args } { - set args [lreplace $args 0 0] - set selector "target [join [lindex $args 1]]" - if { [dg-process-target $selector] == "S" } { - global compiler_conditional_xfail_data - set compiler_conditional_xfail_data $args - } -} - - # We need to make sure that additional_files and additional_sources # are both cleared out after every test. It is not enough to clear # them out *before* the next test run because gcc-target-compile gets