public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r9-10072] testsuite: Add testcase for already fixed PR
Date: Wed, 11 May 2022 06:19:55 +0000 (GMT)	[thread overview]
Message-ID: <20220511061955.E528538515FA@sourceware.org> (raw)

https://gcc.gnu.org/g:8552cfa658dcfbd3ed85db356f0782ba69041d14

commit r9-10072-g8552cfa658dcfbd3ed85db356f0782ba69041d14
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri May 14 13:24:12 2021 +0200

    testsuite: Add testcase for already fixed PR
    
    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(); }


                 reply	other threads:[~2022-05-11  6:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220511061955.E528538515FA@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@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).