public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ivan.leonov.d at yandex dot ru" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96676] New: Segmentation fault on parsing simple variadic template function call Date: Tue, 18 Aug 2020 10:58:48 +0000 [thread overview] Message-ID: <bug-96676-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96676 Bug ID: 96676 Summary: Segmentation fault on parsing simple variadic template function call Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ivan.leonov.d at yandex dot ru Target Milestone: --- Sample code: template < typename T, typename... TYPES > struct A { template < TYPES... types > void Get() { } }; void f() {} int main() { A<int, decltype(&f)> a; a.Get<&f>(); } Error and Backtrace: prog.cc: In function 'int main()': prog.cc:13:15: internal compiler error: Segmentation fault 13 | a.Get<&f>(); | ^ 0xc026af crash_signal ../../source/gcc/toplev.c:327 0x73a995 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*) ../../source/gcc/cp/pt.c:12871 0x7356d1 coerce_template_parameter_pack ../../source/gcc/cp/pt.c:8538 0x7356d1 coerce_template_parms ../../source/gcc/cp/pt.c:8830 0x747bc8 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool, bool) ../../source/gcc/cp/pt.c:21078 0x619282 add_template_candidate_real ../../source/gcc/cp/call.c:3417 0x6199bc add_template_candidate ../../source/gcc/cp/call.c:3502 0x6199bc add_candidates ../../source/gcc/cp/call.c:5883 0x61a9cc add_candidates ../../source/gcc/cp/call.c:5798 0x61a9cc build_new_method_call_1 ../../source/gcc/cp/call.c:10271 0x61b6ff build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) ../../source/gcc/cp/call.c:10478 0x6fcdd7 cp_parser_postfix_expression ../../source/gcc/cp/parser.c:7513 0x6dfa9a cp_parser_binary_expression ../../source/gcc/cp/parser.c:9641 0x6e13de cp_parser_assignment_expression ../../source/gcc/cp/parser.c:9946 0x6e16e2 cp_parser_expression ../../source/gcc/cp/parser.c:10114 0x6e41b8 cp_parser_expression_statement ../../source/gcc/cp/parser.c:11774 0x6eef10 cp_parser_statement ../../source/gcc/cp/parser.c:11570 0x6f076d cp_parser_statement_seq_opt ../../source/gcc/cp/parser.c:11921 0x6f0820 cp_parser_compound_statement ../../source/gcc/cp/parser.c:11871 0x7078da cp_parser_function_body ../../source/gcc/cp/parser.c:23170
next reply other threads:[~2020-08-18 10:58 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-18 10:58 ivan.leonov.d at yandex dot ru [this message] 2020-08-18 11:01 ` [Bug c++/96676] " ivan.leonov.d at yandex dot ru 2020-08-18 16:47 ` mpolacek at gcc dot gnu.org 2020-08-18 16:52 ` mpolacek at gcc dot gnu.org
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=bug-96676-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).