public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add test for pr97560.
@ 2020-10-27  6:38 Aldy Hernandez
  2020-10-27 14:10 ` [committed] testsuite: restrict test to c++11 and later [PR97590] Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Aldy Hernandez @ 2020-10-27  6:38 UTC (permalink / raw)
  To: GCC patches

This was already fixed by the patch for PR97520, but it can't hurt to
keep this test around as well :).

Pushed.

gcc/testsuite/ChangeLog:

	PR tree-optimization/97560
	* g++.dg/pr97560.C: New test.
---
 gcc/testsuite/g++.dg/pr97560.C | 44 ++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/pr97560.C

diff --git a/gcc/testsuite/g++.dg/pr97560.C b/gcc/testsuite/g++.dg/pr97560.C
new file mode 100644
index 00000000000..f9e7edfcaf9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr97560.C
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-O2 -fno-tree-forwprop -fnon-call-exceptions" }
+
+template <typename>
+struct pv;
+
+template <typename CY>
+struct pv<CY &> {
+  typedef CY g7;
+};
+
+template <typename Q6>
+typename pv<Q6>::g7 hq (Q6 &&lb)
+{
+  return static_cast<typename pv<Q6>::g7 &&> (lb);
+}
+
+struct fk {
+  fk *j6;
+  fk *od;
+};
+
+fk *qi;
+
+struct xz : fk {
+  xz (xz &&)
+  {
+    qi = this;
+
+    if (j6)
+      od = this;
+  }
+};
+
+struct el {
+  struct {
+    xz ls;
+  } eu;
+};
+
+struct be : el {
+};
+
+be l1 = hq (l1);
-- 
2.26.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [committed] testsuite: restrict test to c++11 and later [PR97590]
  2020-10-27  6:38 [PATCH] Add test for pr97560 Aldy Hernandez
@ 2020-10-27 14:10 ` Jakub Jelinek
  2020-10-27 14:20   ` Aldy Hernandez
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2020-10-27 14:10 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: GCC patches

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.

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [committed] testsuite: restrict test to c++11 and later [PR97590]
  2020-10-27 14:10 ` [committed] testsuite: restrict test to c++11 and later [PR97590] Jakub Jelinek
@ 2020-10-27 14:20   ` Aldy Hernandez
  2020-10-27 14:29     ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Aldy Hernandez @ 2020-10-27 14:20 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC patches

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
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [committed] testsuite: restrict test to c++11 and later [PR97590]
  2020-10-27 14:20   ` Aldy Hernandez
@ 2020-10-27 14:29     ` Jakub Jelinek
  2020-10-27 15:04       ` Aldy Hernandez
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2020-10-27 14:29 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: GCC patches

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [committed] testsuite: restrict test to c++11 and later [PR97590]
  2020-10-27 14:29     ` Jakub Jelinek
@ 2020-10-27 15:04       ` Aldy Hernandez
  0 siblings, 0 replies; 5+ messages in thread
From: Aldy Hernandez @ 2020-10-27 15:04 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC patches

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-27 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27  6:38 [PATCH] Add test for pr97560 Aldy Hernandez
2020-10-27 14:10 ` [committed] testsuite: restrict test to c++11 and later [PR97590] Jakub Jelinek
2020-10-27 14:20   ` Aldy Hernandez
2020-10-27 14:29     ` Jakub Jelinek
2020-10-27 15:04       ` Aldy Hernandez

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).