public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aldyh/heads/ranger-staging)] c++: Add test for c++/91104
@ 2020-06-27 21:31 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2020-06-27 21:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:08ca2d744d50d0d5a341530031e6bbb82831109f

commit 08ca2d744d50d0d5a341530031e6bbb82831109f
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Jun 25 19:04:06 2020 -0400

    c++: Add test for c++/91104
    
    Fixed by r271705.
    
    gcc/testsuite/ChangeLog:
    
            PR c++/91104
            * g++.dg/cpp1y/lambda-generic-variadic21.C: New test.

Diff:
---
 .../g++.dg/cpp1y/lambda-generic-variadic21.C       | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic21.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic21.C
new file mode 100644
index 00000000000..affb1ffd474
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic21.C
@@ -0,0 +1,26 @@
+// PR c++/91104
+// { dg-do run { target c++14 } }
+
+void
+test (void (*f)(int, int, int))
+{
+  f(1, 2, 3);
+}
+
+void
+check (int a, int b, int c)
+{
+  if (a != 1 || b != 2 || c != 3)
+    __builtin_abort ();
+}
+
+int
+main ()
+{
+  test ([](auto... args) {
+    check (args...);
+  });
+  test ([](int a, int b, int c) {
+    check (a, b, c);
+  });
+}


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

only message in thread, other threads:[~2020-06-27 21:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-27 21:31 [gcc(refs/users/aldyh/heads/ranger-staging)] c++: Add test for c++/91104 Aldy Hernandez

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