public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] c++: Add fixed test [PR102870]
@ 2023-01-31 18:30 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2023-01-31 18:30 UTC (permalink / raw)
  To: GCC Patches

This was fixed by r12-7857: now we properly reject instead of
crashing.

	PR c++/102870

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/variadic184.C: New test.
---
 gcc/testsuite/g++.dg/cpp0x/variadic184.C | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/variadic184.C

diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic184.C b/gcc/testsuite/g++.dg/cpp0x/variadic184.C
new file mode 100644
index 00000000000..458357ac5a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic184.C
@@ -0,0 +1,12 @@
+// PR c++/102870
+// { dg-do compile { target c++11 } }
+
+template <typename> struct integer_sequence;
+template <typename _Tp, _Tp _Num>
+using make_integer_sequence = integer_sequence<_Tp, __integer_pack(_Num)...>;
+template <long _Num>
+using make_index_sequence = make_integer_sequence<long, _Num>;
+template <class> struct Tuple;
+template <int... Is> using type = Tuple<make_index_sequence<Is>...>;
+template <int... Is> void f() { Tuple<type<Is>>{}; } // { dg-error "parameter packs not expanded" }
+int main() { f(); }

base-commit: 77906341efc5cb69aada0645c22850bc83c1d42c
-- 
2.39.1


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

only message in thread, other threads:[~2023-01-31 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 18:30 [pushed] c++: Add fixed test [PR102870] 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).