public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: Peter Bergner <bergner@linux.ibm.com>,
	Jason Merrill <jason@redhat.com>, Martin Jambor <mjambor@suse.cz>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] SRA: Force gimple operand in an additional corner case (PR 112822)
Date: Wed, 13 Dec 2023 09:05:05 +0100	[thread overview]
Message-ID: <ZXllscs6Ovx0diIC@tucnak> (raw)
In-Reply-To: <1703r293-4sr6-4n69-o0p9-93qsn7p043n9@fhfr.qr>

On Wed, Dec 13, 2023 at 08:51:16AM +0100, Richard Biener wrote:
> On Tue, 12 Dec 2023, Peter Bergner wrote:
> 
> > On 12/12/23 8:36 PM, Jason Merrill wrote:
> > > This test is failing for me below C++17, I think you need
> > > 
> > > // { dg-do compile { target c++17 } }
> > > or
> > > // { dg-require-effective-target c++17 }
> > 
> > Sorry about that.  Should we do the above or should we just add
> > -std=c++17 to dg-options?  ...or do we need to do both?
> 
> Just do the above, the C++ testsuite iterates over all standards,
> adding -std=c++17 would just run that 5 times.  But the above
> properly skips unsupported cases.

I believe if one uses explicit -std=gnu++17 or -std=c++17 in dg-options
then it will not iterate:
        # If the testcase specifies a standard, use that one.
        # If not, run it under several standards, allowing GNU extensions
        # if there's a dg-options line.
        if ![search_for $test "-std=*++"] {
and otherwise how many times exactly it iterates depends on what the user
asked for or what effective target is there (normally the default is
to iterate 4 times (98,14,17,20), one can use e.g.
GXX_TESTSUITE_STDS=98,11,14,17,20,23,26 to iterate 7 times, or the
default also changes if c++23, c++26 or c++11_only effective targets
are present somewhere in the test.

But sure, if the test is valid in C++17, 20, 23, 26, then
// { dg-do compile { target c++17 } }
is best (unless the test is mostly language version independent and
very expensive to compile or run).

	Jakub


  reply	other threads:[~2023-12-13  8:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 16:50 Martin Jambor
2023-12-12 17:17 ` Richard Biener
2023-12-12 18:45 ` Peter Bergner
2023-12-12 18:51   ` Peter Bergner
2023-12-12 19:26     ` Richard Biener
2023-12-12 22:50       ` Peter Bergner
2023-12-13  2:36         ` Jason Merrill
2023-12-13  5:26           ` Peter Bergner
2023-12-13  7:51             ` Richard Biener
2023-12-13  8:05               ` Jakub Jelinek [this message]
2023-12-13 14:21                 ` Peter Bergner
2023-12-13 16:24           ` Jason Merrill
2023-12-13 16:26             ` Jakub Jelinek
2023-12-13 19:23               ` Jason Merrill

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=ZXllscs6Ovx0diIC@tucnak \
    --to=jakub@redhat.com \
    --cc=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=mjambor@suse.cz \
    --cc=rguenther@suse.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).