public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58648] New: [c++11] ICE with variadic template Date: Sun, 06 Oct 2013 20:57:00 -0000 [thread overview] Message-ID: <bug-58648-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58648 Bug ID: 58648 Summary: [c++11] ICE with variadic template Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.4.0: ==================================================== template<int, typename...T, T...> int foo(); int i = foo<0>(); ==================================================== bug.cc:3:16: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst_pack_expansion, at cp/pt.c:9535 int i = foo<0>(); ^ 0xce3195 tree_vec_elt_check_failed(int, int, char const*, int, char const*) ../../gcc/gcc/tree.c:9361 0x5a9fad tree_vec_elt_check ../../gcc/gcc/tree.h:2799 0x5a9fad tsubst_pack_expansion ../../gcc/gcc/cp/pt.c:9535 0x5aac77 coerce_template_parameter_pack ../../gcc/gcc/cp/pt.c:6514 0x5aac77 coerce_template_parms ../../gcc/gcc/cp/pt.c:6776 0x5d1493 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15301 0x53e9bc add_template_candidate_real ../../gcc/gcc/cp/call.c:2923 0x53a739 add_template_candidate ../../gcc/gcc/cp/call.c:3020 0x53a739 add_candidates ../../gcc/gcc/cp/call.c:5075 0x541867 perform_overload_resolution ../../gcc/gcc/cp/call.c:3816 0x5481da build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) ../../gcc/gcc/cp/call.c:3893 0x6b4dce finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/gcc/cp/semantics.c:2257 0x6417e6 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6009 0x64412d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x644cff cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6451bf cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x645616 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7987 0x645616 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8197 0x6513be cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16530 0x65198f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10995 Please submit a full bug report, [etc.]
next reply other threads:[~2013-10-06 20:57 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-06 20:57 reichelt at gcc dot gnu.org [this message] 2014-02-26 21:46 ` [Bug c++/58648] " reichelt at gcc dot gnu.org 2014-02-27 17:06 ` jason at gcc dot gnu.org 2014-02-27 17:07 ` jason 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-58648-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).