diff mbox series

[committed] testsuite: restrict test to c++11 and later [PR97590]

Message ID 20201027141021.GM7080@tucnak
State New
Headers show
Series [committed] testsuite: restrict test to c++11 and later [PR97590] | expand

Commit Message

Jakub Jelinek Oct. 27, 2020, 2:10 p.m. UTC
On Tue, Oct 27, 2020 at 07:38:53AM +0100, Aldy Hernandez via Gcc-patches wrote:
> This was already fixed by the patch for PR97520, but it can't hurt to
> keep this test around as well :).

Small tweaks for that.  Note, it would be better to put such tests into
g++.dg/opt/, g++.dg/ itself shouldn't really have any tests directly.

2020-10-27  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/97560
	PR testsuite/97590
	* g++.dg/pr97560.C: Require c++11 effective target and add comment
	with PR number.


	Jakub

Comments

Aldy Hernandez Oct. 27, 2020, 2:20 p.m. UTC | #1
On Tue, Oct 27, 2020 at 3:10 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Oct 27, 2020 at 07:38:53AM +0100, Aldy Hernandez via Gcc-patches wrote:
> > This was already fixed by the patch for PR97520, but it can't hurt to
> > keep this test around as well :).
>
> Small tweaks for that.  Note, it would be better to put such tests into

thanks.

> g++.dg/opt/, g++.dg/ itself shouldn't really have any tests directly.

Wait, what?  I've always put them into g++.dg.  And it looks like that
directory is chock-full of PRxxxx.C files.  When did we change to
opt/?  How about gcc.dg?  I don't see an opt/ directory there.

Anyways, will do from now on.

Thanks.
Aldy

>
> 2020-10-27  Jakub Jelinek  <jakub@redhat.com>
>
>         PR tree-optimization/97560
>         PR testsuite/97590
>         * g++.dg/pr97560.C: Require c++11 effective target and add comment
>         with PR number.
>
> diff --git a/gcc/testsuite/g++.dg/pr97560.C b/gcc/testsuite/g++.dg/pr97560.C
> index f9e7edfcaf9..59313f972df 100644
> --- a/gcc/testsuite/g++.dg/pr97560.C
> +++ b/gcc/testsuite/g++.dg/pr97560.C
> @@ -1,4 +1,5 @@
> -// { dg-do compile }
> +// PR tree-optimization/97560
> +// { dg-do compile { target c++11 } }
>  // { dg-options "-O2 -fno-tree-forwprop -fnon-call-exceptions" }
>
>  template <typename>
>
>         Jakub
>
Jakub Jelinek Oct. 27, 2020, 2:29 p.m. UTC | #2
On Tue, Oct 27, 2020 at 03:20:55PM +0100, Aldy Hernandez wrote:
> > g++.dg/opt/, g++.dg/ itself shouldn't really have any tests directly.
> 
> Wait, what?  I've always put them into g++.dg.  And it looks like that

Many people violate that.

> directory is chock-full of PRxxxx.C files.  When did we change to
> opt/?  How about gcc.dg?  I don't see an opt/ directory there.

gcc.dg/ doesn't use subdirectories in general (unless one needs different
testsuite drivers), while g++.dg historically has been using topic
subdirectories.
The loads of tests are different, gcc.dg/ has directly in it more than 5000
tests, while g++.dg less than 300, while over 12000 tests in subdirectories.

	Jakub
Aldy Hernandez Oct. 27, 2020, 3:04 p.m. UTC | #3
On Tue, Oct 27, 2020 at 3:29 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Oct 27, 2020 at 03:20:55PM +0100, Aldy Hernandez wrote:
> > > g++.dg/opt/, g++.dg/ itself shouldn't really have any tests directly.
> >
> > Wait, what?  I've always put them into g++.dg.  And it looks like that
>
> Many people violate that.

Guilty as charged!

>
> > directory is chock-full of PRxxxx.C files.  When did we change to
> > opt/?  How about gcc.dg?  I don't see an opt/ directory there.
>
> gcc.dg/ doesn't use subdirectories in general (unless one needs different
> testsuite drivers), while g++.dg historically has been using topic
> subdirectories.
> The loads of tests are different, gcc.dg/ has directly in it more than 5000
> tests, while g++.dg less than 300, while over 12000 tests in subdirectories.

I will adjust my renegade behavior from now on :)

Aldy
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/pr97560.C b/gcc/testsuite/g++.dg/pr97560.C
index f9e7edfcaf9..59313f972df 100644
--- a/gcc/testsuite/g++.dg/pr97560.C
+++ b/gcc/testsuite/g++.dg/pr97560.C
@@ -1,4 +1,5 @@ 
-// { dg-do compile }
+// PR tree-optimization/97560
+// { dg-do compile { target c++11 } }
 // { dg-options "-O2 -fno-tree-forwprop -fnon-call-exceptions" }
 
 template <typename>