public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8415] testsuite: Add testcase for already fixed PR [PR88872]
@ 2021-05-14 12:08 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-05-14 12:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b59973ce8b86f82829fa9f92789ec56461b21b78
commit r11-8415-gb59973ce8b86f82829fa9f92789ec56461b21b78
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri May 14 13:24:12 2021 +0200
testsuite: Add testcase for already fixed PR [PR88872]
2021-05-14 Jakub Jelinek <jakub@redhat.com>
* g++.dg/cpp1y/pr88872.C: New test.
(cherry picked from commit f05627d404038368b99e92ac4df4c29f4ae4a5fa)
Diff:
---
gcc/testsuite/g++.dg/cpp1y/pr88872.C | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr88872.C b/gcc/testsuite/g++.dg/cpp1y/pr88872.C
new file mode 100644
index 00000000000..3719e395c0e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr88872.C
@@ -0,0 +1,24 @@
+// PR c++/88872
+// { dg-do compile { target c++14 } }
+
+struct a {
+ template <typename b> constexpr a(b) : c() {}
+ int c;
+};
+void d();
+template <char...> constexpr a operator"" _n() { return d; }
+struct e;
+struct f {
+ e operator[](int);
+};
+struct g {
+ void h();
+ f i;
+};
+template <typename> struct j {
+ void k() { [](auto) { constexpr auto l = 2_n; }(keywords); }
+ int keywords;
+};
+using m = j<int>;
+class e : public m {};
+void g::h() { i[0].k(); }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-14 12:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 12:08 [gcc r11-8415] testsuite: Add testcase for already fixed PR [PR88872] Jakub Jelinek
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).