[testsuite, libffi] XFAIL libffi.call/cls_{,long}double_va.c on IRIX 6.5 (PR libffi/46660)

Richard Guenther richard.guenther@gmail.com
Wed Jun 29 13:08:00 GMT 2011


On Wed, Jun 29, 2011 at 10:26 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> 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, 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.

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 test,
is 7.0
FAIL: libffi.call/cls_longdouble_va.c -O2 -fomit-frame-pointer output pattern 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.

>        Rainer
>
>
> Mainline/4.6 branch version:
>
> 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>        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  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>        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
>
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>



More information about the Gcc-patches mailing list