public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Patrick Palka <ppalka@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-5532] c++: add fixed testcases [PR98614, PR104802]
Date: Thu, 16 Nov 2023 15:50:25 +0000 (GMT)	[thread overview]
Message-ID: <20231116155025.369293858425@sourceware.org> (raw)

https://gcc.gnu.org/g:063d987af0e7a8329559fb116337bdb8ab20d8eb

commit r14-5532-g063d987af0e7a8329559fb116337bdb8ab20d8eb
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Nov 16 10:49:17 2023 -0500

    c++: add fixed testcases [PR98614, PR104802]
    
    Both of these PRs are fixed by r12-1403-gc4e50e500da7692a.
    
            PR c++/98614
            PR c++/104802
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/cpp1z/nontype-auto22.C: New test.
            * g++.dg/cpp2a/concepts-partial-spec14.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C          | 17 +++++++++++++++++
 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec14.C | 10 ++++++++++
 2 files changed, 27 insertions(+)

diff --git a/gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C b/gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C
new file mode 100644
index 00000000000..1882d2586d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C
@@ -0,0 +1,17 @@
+// PR c++/104802
+// { dg-do compile { target c++17 } }
+
+template<auto const& ... Args>
+struct S {
+  template<typename=void>
+  void operator()() const {}
+};
+
+struct weird_ {
+  int operator&() const { return 123; }
+} const weird {};
+
+int main() {
+  S<weird> s {};
+  s();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec14.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec14.C
new file mode 100644
index 00000000000..c94b4013340
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec14.C
@@ -0,0 +1,10 @@
+// PR c++/98614
+// { dg-do compile { target c++20 } }
+
+template<class T>
+struct A;
+
+template<class T> requires true
+struct A<T> {
+  A(A<T> const&) = default;
+};

                 reply	other threads:[~2023-11-16 15:50 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=20231116155025.369293858425@sourceware.org \
    --to=ppalka@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).