public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] c++: Add new test [PR59978]
@ 2020-07-14 21:33 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2020-07-14 21:33 UTC (permalink / raw)
  To: GCC Patches

Fixed in r224162.  That came without a test so adding this one.
Previously, we issued a bogus "too few arguments to function" error.

Tested x86_64-pc-linux-gnu, applying to trunk.

gcc/testsuite/ChangeLog:

	PR c++/59978
	* g++.dg/cpp0x/vt-59978.C: New test.
---
 gcc/testsuite/g++.dg/cpp0x/vt-59978.C | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/vt-59978.C

diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-59978.C b/gcc/testsuite/g++.dg/cpp0x/vt-59978.C
new file mode 100644
index 00000000000..b7cdb19353a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-59978.C
@@ -0,0 +1,16 @@
+// PR c++/59978
+// { dg-do compile { target c++11 } }
+
+static void testFunc(int i1, int i2) {
+    (void)i1;
+    (void)i2;
+}
+
+template <int... Ints> void wrapper() {
+    testFunc(Ints...);
+}
+
+int main()
+{
+    wrapper<1, 2>();
+}

base-commit: b2984e5ada65f417e8704d2e1e81ccd0272b5eb3
-- 
2.26.2


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

only message in thread, other threads:[~2020-07-14 21:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 21:33 [committed] c++: Add new test [PR59978] Marek Polacek

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