From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] Add test for pr97560.
Date: Tue, 27 Oct 2020 07:38:53 +0100 [thread overview]
Message-ID: <20201027063853.52496-1-aldyh@redhat.com> (raw)
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
next reply other threads:[~2020-10-27 6:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 6:38 Aldy Hernandez [this message]
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
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=20201027063853.52496-1-aldyh@redhat.com \
--to=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).