From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17395 invoked by alias); 29 Jun 2011 12:40:30 -0000 Received: (qmail 17369 invoked by uid 22791); 29 Jun 2011 12:40:28 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_BF X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jun 2011 12:40:12 +0000 Received: by wwj26 with SMTP id 26so1099010wwj.8 for ; Wed, 29 Jun 2011 05:40:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.172.203 with SMTP id m11mr132291wbz.65.1309351211099; Wed, 29 Jun 2011 05:40:11 -0700 (PDT) Received: by 10.227.36.212 with HTTP; Wed, 29 Jun 2011 05:40:11 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Jun 2011 12:40:00 -0000 Message-ID: Subject: Re: [testsuite, libffi] XFAIL libffi.call/cls_{,long}double_va.c on IRIX 6.5 (PR libffi/46660) From: Richard Guenther To: Rainer Orth Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org, libffi-discuss@sourceware.org, Andreas Tobler Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2011-q2/txt/msg00092.txt.bz2 On Wed, Jun 29, 2011 at 10:26 AM, Rainer Orth wrote: > 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, i= s 0.0 > > Those tests pass floating point arguments to varargs functions, which > libffi currently (i.e. before 3.0.11) doesn't support. =A0Unfortunately, > 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=3D0650&db=3Db= ks&srch=3D&fname=3D/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. =A0On mainline and the 4.6 branch, it > xfails the tests on IRIX 6. =A0The 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. =A0Unfortunately, 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. =A0Even 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. =A0To 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. The tests now fail on x86_64-linux and i?86-linux like FAIL: libffi.call/cls_double_va.c -O0 -W -Wall output pattern test, is 7.0 FAIL: libffi.call/cls_longdouble_va.c -O0 -W -Wall output pattern test, is = 7.0 FAIL: libffi.call/cls_double_va.c -O2 output pattern test, is 7.0 FAIL: libffi.call/cls_longdouble_va.c -O2 output pattern test, is 7.0 FAIL: libffi.call/cls_double_va.c -O3 output pattern test, is 7.0 FAIL: libffi.call/cls_longdouble_va.c -O3 output pattern test, is 7.0 FAIL: libffi.call/cls_double_va.c -Os output pattern test, is 7.0 FAIL: libffi.call/cls_longdouble_va.c -Os output pattern test, is 7.0 FAIL: libffi.call/cls_double_va.c -O2 -fomit-frame-pointer output pattern t= est, is 7.0 FAIL: libffi.call/cls_longdouble_va.c -O2 -fomit-frame-pointer output patte= rn te st, is 7.0 spawn [open ...]^M 7.0 res: 4 7.0 res: 4 PASS: libffi.call/cls_double_va.c -O0 -W -Wall execution test FAIL: libffi.call/cls_double_va.c -O0 -W -Wall output pattern test, is 7.0 res: 4 7.0 res: 4 , should match PR libffi/466607.0^M? res: 4^M? 7.0^M? res: 4 I believe your dg-output first arguments are bogus. Richard. > =A0 =A0 =A0 =A0Rainer > > > Mainline/4.6 branch version: > > 2011-06-29 =A0Rainer Orth =A0 > > =A0 =A0 =A0 =A0PR libffi/46660 > =A0 =A0 =A0 =A0* testsuite/libffi.call/cls_double_va.c: xfail dg-output on > =A0 =A0 =A0 =A0mips-sgi-irix6*. > =A0 =A0 =A0 =A0* testsuite/libffi.call/cls_longdouble_va.c: Likewise. > > Index: libffi/testsuite/libffi.call/cls_double_va.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libffi/testsuite/libffi.call/cls_double_va.c =A0 =A0 =A0 =A0(revision= 175617) > +++ libffi/testsuite/libffi.call/cls_double_va.c =A0 =A0 =A0 =A0(working = copy) > @@ -6,6 +6,7 @@ > > =A0/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ > =A0/* { dg-output "" { xfail avr32*-*-* } } */ > +/* { dg-output "PR libffi/46660" { xfail mips-sgi-irix6* } } */ > =A0/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=3Dhard" } { "" } } */ > > =A0#include "ffitest.h" > Index: libffi/testsuite/libffi.call/cls_longdouble_va.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libffi/testsuite/libffi.call/cls_longdouble_va.c =A0 =A0(revision 175= 617) > +++ libffi/testsuite/libffi.call/cls_longdouble_va.c =A0 =A0(working copy) > @@ -6,6 +6,7 @@ > > =A0/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ > =A0/* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */ > +/* { dg-output "PR libffi/46660" { xfail mips-sgi-irix6* } } */ > =A0/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=3Dhard" } { "" } } */ > > =A0#include "ffitest.h" > > 4.5 branch version: > > 2011-06-29 =A0Rainer Orth =A0 > > =A0 =A0 =A0 =A0PR libffi/46660 > =A0 =A0 =A0 =A0* testsuite/lib/libffi-dg.exp: Load target-supports.exp, > =A0 =A0 =A0 =A0target-supports-dg.exp. > =A0 =A0 =A0 =A0(dg-xfail-if): Remove. > =A0 =A0 =A0 =A0* testsuite/libffi.call/cls_double_va.c: Skip on mips-sgi-= irix6* > =A0 =A0 =A0 =A0unless -mabi=3D32. > =A0 =A0 =A0 =A0* testsuite/libffi.call/cls_longdouble_va.c: Likewise. > > Index: libffi/testsuite/libffi.call/cls_double_va.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libffi/testsuite/libffi.call/cls_double_va.c =A0 =A0 =A0 =A0(revision= 175619) > +++ libffi/testsuite/libffi.call/cls_double_va.c =A0 =A0 =A0 =A0(working = copy) > @@ -6,6 +6,7 @@ > > =A0/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ > =A0/* { dg-output "" { xfail avr32*-*-* } } */ > +/* { dg-skip-if "PR libffi/46660" { mips-sgi-irix6* } { "*" } { "-mabi= =3D32" } } */ > =A0#include "ffitest.h" > > =A0static void > Index: libffi/testsuite/libffi.call/cls_longdouble_va.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libffi/testsuite/libffi.call/cls_longdouble_va.c =A0 =A0(revision 175= 619) > +++ libffi/testsuite/libffi.call/cls_longdouble_va.c =A0 =A0(working copy) > @@ -6,6 +6,7 @@ > > =A0/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ > =A0/* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */ > +/* { dg-skip-if "PR libffi/46660" { mips-sgi-irix6* } { "*" } { "-mabi= =3D32" } } */ > =A0#include "ffitest.h" > > =A0static void > Index: libffi/testsuite/lib/libffi-dg.exp > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libffi/testsuite/lib/libffi-dg.exp =A0(revision 175619) > +++ libffi/testsuite/lib/libffi-dg.exp =A0(working copy) > @@ -1,4 +1,5 @@ > -# =A0 Copyright (C) 2003, 2005, 2008, 2009, 2010 Free Software Foundatio= n, Inc. > +# Copyright (C) 2003, 2005, 2008, 2009, 2010, 2011 > +# Free Software Foundation, Inc. > > =A0# This program is free software; you can redistribute it and/or modify > =A0# it under the terms of the GNU General Public License as published by > @@ -21,6 +22,8 @@ > > =A0load_lib dg.exp > =A0load_lib libgloss.exp > +load_gcc_lib target-supports.exp > +load_gcc_lib target-supports-dg.exp > =A0load_gcc_lib target-libpath.exp > =A0load_gcc_lib wrapper.exp > > @@ -261,18 +264,6 @@ > =A0} > > > -# Like check_conditional_xfail, but callable from a dg test. > - > -proc dg-xfail-if { args } { > - =A0 =A0set args [lreplace $args 0 0] > - =A0 =A0set selector "target [join [lindex $args 1]]" > - =A0 =A0if { [dg-process-target $selector] =3D=3D "S" } { > - =A0 =A0 =A0 global compiler_conditional_xfail_data > - =A0 =A0 =A0 set compiler_conditional_xfail_data $args > - =A0 =A0} > -} > - > - > =A0# We need to make sure that additional_files and additional_sources > =A0# are both cleared out after every test. =A0It is not enough to clear > =A0# them out *before* the next test run because gcc-target-compile gets > > > -- > -------------------------------------------------------------------------= ---- > Rainer Orth, Center for Biotechnology, Bielefeld University >