public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marek Polacek <mpolacek@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5608] c++: Add fixed test [PR102870] Date: Tue, 31 Jan 2023 18:29:30 +0000 (GMT) [thread overview] Message-ID: <20230131182930.D65BA3858D28@sourceware.org> (raw) https://gcc.gnu.org/g:b2ec2504af77b35e748067eeb846821d12a6b6b4 commit r13-5608-gb2ec2504af77b35e748067eeb846821d12a6b6b4 Author: Marek Polacek <polacek@redhat.com> Date: Tue Jan 31 13:27:21 2023 -0500 c++: Add fixed test [PR102870] 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. Diff: --- gcc/testsuite/g++.dg/cpp0x/variadic184.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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(); }
reply other threads:[~2023-01-31 18:29 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=20230131182930.D65BA3858D28@sourceware.org \ --to=mpolacek@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: linkBe 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).