public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org,
		libffi-discuss@sourceware.org,
	Andreas Tobler <andreast@gcc.gnu.org>
Subject: Re: [testsuite, libffi] XFAIL libffi.call/cls_{,long}double_va.c on IRIX 6.5 (PR libffi/46660)
Date: Wed, 29 Jun 2011 12:40:00 -0000	[thread overview]
Message-ID: <BANLkTi=egX-2FJt0tU3o9rFZdK4kxKF2=Q@mail.gmail.com> (raw)
In-Reply-To: <yddd3hx59h6.fsf@manam.CeBiTec.Uni-Bielefeld.DE>

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
>

  reply	other threads:[~2011-06-29 12:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29  8:27 Rainer Orth
2011-06-29 12:40 ` Richard Guenther [this message]
2011-06-29 12:53   ` Rainer Orth
2011-06-29 13:41     ` H.J. Lu
2011-06-29 13:43       ` Rainer Orth
2011-06-29 13:52         ` David Gilbert
2011-06-29 13:54           ` Rainer Orth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=egX-2FJt0tU3o9rFZdK4kxKF2=Q@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=andreast@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    --cc=libffi-discuss@sourceware.org \
    --cc=ro@cebitec.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).