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++/60200] New: [c++11] ICE with invalid use of auto in typedef Date: Fri, 14 Feb 2014 16:02:00 -0000 [thread overview] Message-ID: <bug-60200-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60200 Bug ID: 60200 Summary: [c++11] ICE with invalid use of auto in typedef 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 invalid code snippet (compiled with "-std=c++11") triggers an ICE on trunk: =========================================== template<typename> struct A { typedef auto X; }; A<int> a; =========================================== bug.cc:3:16: error: typedef declared 'auto' typedef auto X; ^ bug.cc: In instantiation of 'struct A<int>': bug.cc:6:8: required from here bug.cc:3:16: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10817 0xdc0407 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9243 0x631b69 tree_class_check ../../gcc/gcc/tree.h:2832 0x631b69 tsubst_decl ../../gcc/gcc/cp/pt.c:10817 0x61be9f tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11357 0x64a34a instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:9010 0x64a34a instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:9274 0x6db973 complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:134 0x5c4f38 start_decl_1(tree_node*, bool) ../../gcc/gcc/cp/decl.c:4719 0x5ede67 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/gcc/cp/decl.c:4682 0x6c7e9e cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16680 0x6c9929 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11205 0x6acc13 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11086 0x6d3ec2 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10983 0x6d2bb8 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10869 0x6d445a cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4014 0x6d445a c_parse_file() ../../gcc/gcc/cp/parser.c:31536 0x7f37c3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, [etc.]
next reply other threads:[~2014-02-14 16:02 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-02-14 16:02 reichelt at gcc dot gnu.org [this message] 2014-02-14 16:02 ` [Bug c++/60200] [4.9 Regression] " reichelt at gcc dot gnu.org 2014-02-14 16:45 ` jakub at gcc dot gnu.org 2014-02-21 19:00 ` jason at gcc dot gnu.org 2014-02-21 20:43 ` 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-60200-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).