public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] c++: add fixed testcases [PR98614, PR104802]
@ 2023-11-16 15:51 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2023-11-16 15:51 UTC (permalink / raw)
  To: gcc-patches; +Cc: jason, Patrick Palka

Tested on x86_64-pc-linux-gnu, pushed to trunk.

-- >8 --

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.
---
 gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C     | 17 +++++++++++++++++
 .../g++.dg/cpp2a/concepts-partial-spec14.C      | 10 ++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C
 create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec14.C

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;
+};
-- 
2.43.0.rc1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-16 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 15:51 [pushed] c++: add fixed testcases [PR98614, PR104802] Patrick Palka

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