public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@bitrange.com>
To: Steve Ellcey <sje@cup.hp.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch, testsuite] Fix g++.dg/opt/devirt2.C scanning, PR 48727
Date: Wed, 15 Jun 2011 17:15:00 -0000	[thread overview]
Message-ID: <alpine.BSF.2.00.1106151244380.43062@dair.pair.com> (raw)
In-Reply-To: <201106101628.p5AGSXG20686@lucas.cup.hp.com>

On Fri, 10 Jun 2011, Steve Ellcey wrote:

> I will check in this testsuite fix as obvious if there are no objections.

But... :)

> On IA64 and HPPA the test generates global declarations for the function
> as well as calls so the scan-assembler-times fails because it finds the
> declarations as well as the two calls.  The fix is to make the scans more
> specific on IA64 and HPPA.  This fix follows the example of what was
> done in gcc.dg/tree-ssa/loop-1.c.
>
> Steve Ellcey
> sje@cup.hp.com
>
>
> 2011-06-10  Steve Ellcey  <sje@cup.hp.com>
>
> 	PR testsuite/48727
> 	* g++.dg/opt/devirt2.C: Fix scan rules for ia64*-*-* and hppa*-*-*.
>
>
> Index: g++.dg/opt/devirt2.C
> ===================================================================
> --- g++.dg/opt/devirt2.C	(revision 174878)
> +++ g++.dg/opt/devirt2.C	(working copy)
> @@ -1,6 +1,10 @@
>  // { dg-do compile }
>  // { dg-options "-O2" }
> -// { dg-final { scan-assembler-times "xyzzy" 2 } }
> +// The IA64 and HPPA compilers generate external declarations in addition
> +// to the call so those scans need to be more specific.
> +// { dg-final { scan-assembler-times "xyzzy" 2 { xfail hppa*-*-* ia64*-*-* } } }

JFTR, if you want this to be really right, you should not xfail
this part of the test but rather skip it, as the test is at
fault, not the targets/gcc.  If think it'd be:

// { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { hppa*-*-* ia64*-*-* } } } } }


> +// { dg-final { scan-assembler-times "br\[^\n\]*xyzzy"  2 { target ia64*-*-* } } }
> +// { dg-final { scan-assembler-times "xyzzy\[^\n\]*,%r"  2 { target hppa*-*-* } } }
>
>  struct S { S(); virtual void xyzzy(); };
>  struct R { int a; S s; R(); };
>

brgds, H-P

  parent reply	other threads:[~2011-06-15 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 17:09 Steve Ellcey
2011-06-11 17:53 ` Mike Stump
2011-06-15 17:15 ` Hans-Peter Nilsson [this message]
2011-06-16 20:49   ` Steve Ellcey

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=alpine.BSF.2.00.1106151244380.43062@dair.pair.com \
    --to=hp@bitrange.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sje@cup.hp.com \
    /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).